Hi Rekha,
I’ve set the JDBC ConnectionURL like this “?useUnicode=true&characterEncoding=UTF-8”,but it doesn’t work. And if my table content contains Chinese words, hive can display normally when I exec select query, only table comments and column comments are garbled when I tried to exec “desc table”. So I don’t know where is the problem. I even tried to modify some hive source code in org.apache.hadoop.hive.jdbc to convert comment string to “UTF-8” charset, but it still doesn’t work. But thanks all the same. Thanks & Regards Zhan 发件人: Joshi, Rekha [mailto:rekha_jo...@intuit.com] 发送时间: 2012年8月23日 19:42 收件人: user@hive.apache.org; hyacinth...@hotmail.com 主题: Re: hive comment in Chinese Hi Zhan, Ideally there must be some 'hive.cli.print.charset' property in config xml files somewhere which gets picked up by CliDriver (in say HiveConf.ConfVars.HIVE_CLI_PRINT_CHARSET), but I don't see it. There is one in hive-site.xml to specify character set, but I am not sure if it is picked by CliDriver.But try? <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://<your-db>:3306/hive?characterEncoding=UTF-8</value> </property> Thanks Rekha From: NamasAmitabha <hyacinth...@hotmail.com> Reply-To: <user@hive.apache.org> Date: Wed, 22 Aug 2012 10:14:07 +0800 To: <user@hive.apache.org> Subject: hive comment in Chinese Hi, all I tried to use Chinese in hive column comment and table comment,and the metadata in Mysql is regular,the charset of 'COMMENT' column in 'columns_v2' table and 'PARAM_VALUE' column in 'table_params' table both are 'utf8'. When I exec 'select * from columns_v2' with mysql client,the Chinese comments display normally. But when I execute 'describe table' with hive cli,the Chinese words are garbled.Why is it so? Please help me out. Thanks & Regards Zhan