How was the Chinese words encoded in the file? Is it UTF-8 or GB?
If it's GB, then Hive will have difficulty in converting them to unicode.

Please take a look at Driver.java. There is a method to get the
results as List<String>.
If we get the result as Text (byte array) instead, you can get the
data in the original encoding.

Zheng

2009/12/27 luocanrao <[email protected]>:
> Sorry ,There were some spelling mistake in my last Email, so I am trying to
> describe it again.
>
> Looking forward to hearing from you soon! Thank you in advance!
>
> when I use select command in hive Console
> SELECT pv_gender_sum.* FROM pv_gender_sum , all Chinese words displayed is
> wrong.
> I guess it is the Character coding problem. Can anybody give me some help?
>
> but if i use command
> INSERT OVERWRITE LOCAL DIRECTORY '/tmp/pv_gender_sum' SELECT pv_gender_sum.*
> FROM pv_gender_sum;
> Chinese words in /tmp/pv_gender file look correct.
>
> my hive version hive-0.3.99.1+0
> hadoop version hadoop-0.20.1+152
> linux 2.6
>
>
>
> 发件人: luocanrao [mailto:[email protected]]
> 发送时间: 2009年12月27日 16:03
> 收件人: [email protected]
> 主题: chinese word display wrong in hive cosole,can somebody help me?
>
>
>
> when I use select command in hive cosole
> SELECT pv_gender_sum.* FROM pv_gender_sum , all chinese words display wrong
> I guess is Character coding problem. Any body can give me some help?
>
> but if i use
> INSERT OVERWRITE LOCAL DIRECTORY '/tmp/pv_gender_sum' SELECT pv_gender_sum.*
> FROM pv_gender_sum;
> chinese words in /tmp/pv_gender file looks file.
>
> my hive version hive-0.3.99.1+0
> hadoop version hadoop-0.20.1+152
> linux 2.6
>
>
>
>



-- 
Yours,
Zheng

Reply via email to