You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by 赵天烁 <zh...@meizu.com> on 2016/06/12 03:29:09 UTC

kylin.properties中文配置乱码

如果在kylin的ldap.user.searchPattern中需要包含中文的过滤条件,则实际执行的时候会出现乱码问题。我现在是通过修改KylinConfig,将加载properties文件的代码改为使用inputstreamReader,在reader的参数中指定utf-8来解决:
File cfile = new File(KylinConfig.getKylinHome() + "/conf/" + KylinConfig.KYLIN_CONF_PROPERTIES_FILE);
            Properties p=new Properties();
            p.load(new BufferedReader(new InputStreamReader(new FileInputStream(cfile), "utf-8")));

-----------------------------------------------------

赵天烁
Kevin Zhao
zhaotianshuo@meizu.com<ma...@meizu.com>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China


meizu.com





答复: kylin.properties中文配置乱码

Posted by 赵天烁 <zh...@meizu.com>.
Issue created:
https://issues.apache.org/jira/browse/KYLIN-1781

wanna know how to join the committer’s group?

-----------------------------------------------------

赵天烁
Kevin Zhao
zhaotianshuo@meizu.com<ma...@meizu.com>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China


meizu.com




发件人: hongbin ma [mailto:mahongbin@apache.org]
发送时间: 2016年6月12日 11:38
收件人: user.kylin <us...@kylin.apache.org>
主题: Re: kylin.properties中文配置乱码

https://issues.apache.org/jira/browse/KYLIN

2016-06-12 11:37 GMT+08:00 hongbin ma <ma...@apache.org>>:
can you please open a jira and submit a patch?

2016-06-12 11:29 GMT+08:00 赵天烁 <zh...@meizu.com>>:
如果在kylin的ldap.user.searchPattern中需要包含中文的过滤条件,则实际执行的时候会出现乱码问题。我现在是通过修改KylinConfig,将加载properties文件的代码改为使用inputstreamReader,在reader的参数中指定utf-8来解决:
File cfile = new File(KylinConfig.getKylinHome() + "/conf/" + KylinConfig.KYLIN_CONF_PROPERTIES_FILE);
            Properties p=new Properties();
            p.load(new BufferedReader(new InputStreamReader(new FileInputStream(cfile), "utf-8")));

-----------------------------------------------------

赵天烁
Kevin Zhao
zhaotianshuo@meizu.com<ma...@meizu.com>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China


meizu.com<http://meizu.com>







--
Regards,

Bin Mahone | 马洪宾
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone



--
Regards,

Bin Mahone | 马洪宾
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone

答复: kylin.properties中文配置乱码

Posted by 赵天烁 <zh...@meizu.com>.
Upload my path to this Issue
https://issues.apache.org/jira/browse/KYLIN-1781


-----------------------------------------------------

赵天烁
Kevin Zhao
zhaotianshuo@meizu.com<ma...@meizu.com>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China


meizu.com




发件人: 赵天烁 [mailto:zhaotianshuo@meizu.com]
发送时间: 2016年6月12日 14:05
收件人: user@kylin.apache.org
主题: 答复: kylin.properties中文配置乱码

Issue created:
https://issues.apache.org/jira/browse/KYLIN-1781

wanna know how to join the committer’s group?

-----------------------------------------------------

赵天烁
Kevin Zhao
zhaotianshuo@meizu.com<ma...@meizu.com>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China


meizu.com




发件人: hongbin ma [mailto:mahongbin@apache.org]
发送时间: 2016年6月12日 11:38
收件人: user.kylin <us...@kylin.apache.org>>
主题: Re: kylin.properties中文配置乱码

https://issues.apache.org/jira/browse/KYLIN

2016-06-12 11:37 GMT+08:00 hongbin ma <ma...@apache.org>>:
can you please open a jira and submit a patch?

2016-06-12 11:29 GMT+08:00 赵天烁 <zh...@meizu.com>>:
如果在kylin的ldap.user.searchPattern中需要包含中文的过滤条件,则实际执行的时候会出现乱码问题。我现在是通过修改KylinConfig,将加载properties文件的代码改为使用inputstreamReader,在reader的参数中指定utf-8来解决:
File cfile = new File(KylinConfig.getKylinHome() + "/conf/" + KylinConfig.KYLIN_CONF_PROPERTIES_FILE);
            Properties p=new Properties();
            p.load(new BufferedReader(new InputStreamReader(new FileInputStream(cfile), "utf-8")));

-----------------------------------------------------

赵天烁
Kevin Zhao
zhaotianshuo@meizu.com<ma...@meizu.com>

珠海市魅族科技有限公司
MEIZU Technology Co., Ltd.
广东省珠海市科技创新海岸魅族科技楼
MEIZU Tech Bldg., Technology & Innovation Coast
Zhuhai, 519085, Guangdong, China


meizu.com<http://meizu.com>







--
Regards,

Bin Mahone | 马洪宾
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone



--
Regards,

Bin Mahone | 马洪宾
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone

Re: kylin.properties中文配置乱码

Posted by hongbin ma <ma...@apache.org>.
https://issues.apache.org/jira/browse/KYLIN

2016-06-12 11:37 GMT+08:00 hongbin ma <ma...@apache.org>:

> can you please open a jira and submit a patch?
>
> 2016-06-12 11:29 GMT+08:00 赵天烁 <zh...@meizu.com>:
>
>> 如果在kylin的ldap.user.searchPattern中需要包含中文的过滤条件,则实际执行的时候会出现乱码问题。我现在是通过修改
>> KylinConfig,将加载properties文件的代码改为使用inputstreamReader,在reader的参数中指定utf-8
>> 来解决:
>>
>> File cfile = new File(KylinConfig.getKylinHome() + "/conf/" +
>> KylinConfig.KYLIN_CONF_PROPERTIES_FILE);
>>
>>             Properties p=new Properties();
>>
>>             p.load(new BufferedReader(new InputStreamReader(new
>> FileInputStream(cfile), "utf-8")));
>>
>>
>>
>> -----------------------------------------------------
>>
>>
>>
>> 赵天烁
>>
>> Kevin Zhao
>>
>> *zhaotianshuo@meizu.com <zh...@meizu.com>*
>>
>>
>>
>> 珠海市魅族科技有限公司
>>
>> MEIZU Technology Co., Ltd.
>>
>> 广东省珠海市科技创新海岸魅族科技楼
>>
>> MEIZU Tech Bldg., Technology & Innovation Coast
>>
>> Zhuhai, 519085, Guangdong, China
>>
>>
>>
>>
>>
>> meizu.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
> --
> Regards,
>
> *Bin Mahone | 马洪宾*
> Apache Kylin: http://kylin.io
> Github: https://github.com/binmahone
>



-- 
Regards,

*Bin Mahone | 马洪宾*
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone

Re: kylin.properties中文配置乱码

Posted by hongbin ma <ma...@apache.org>.
can you please open a jira and submit a patch?

2016-06-12 11:29 GMT+08:00 赵天烁 <zh...@meizu.com>:

> 如果在kylin的ldap.user.searchPattern中需要包含中文的过滤条件,则实际执行的时候会出现乱码问题。我现在是通过修改
> KylinConfig,将加载properties文件的代码改为使用inputstreamReader,在reader的参数中指定utf-8来解决:
>
> File cfile = new File(KylinConfig.getKylinHome() + "/conf/" +
> KylinConfig.KYLIN_CONF_PROPERTIES_FILE);
>
>             Properties p=new Properties();
>
>             p.load(new BufferedReader(new InputStreamReader(new
> FileInputStream(cfile), "utf-8")));
>
>
>
> -----------------------------------------------------
>
>
>
> 赵天烁
>
> Kevin Zhao
>
> *zhaotianshuo@meizu.com <zh...@meizu.com>*
>
>
>
> 珠海市魅族科技有限公司
>
> MEIZU Technology Co., Ltd.
>
> 广东省珠海市科技创新海岸魅族科技楼
>
> MEIZU Tech Bldg., Technology & Innovation Coast
>
> Zhuhai, 519085, Guangdong, China
>
>
>
>
>
> meizu.com
>
>
>
>
>
>
>
>
>



-- 
Regards,

*Bin Mahone | 马洪宾*
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone