|
4#
楼主 |
发表于 2014-11-28 11:03:01
|
只看该作者
我调试了很多组合均无法转码成功
例如:
这个字\u8bef是unicode编码【正常为中文:误】
lr_convert_string_encoding("\u8bef","UNICODE","GBK","string");----------->转码后变为"string = 甸扥?\x00".
lr_convert_string_encoding("\u8bef","UNICODE","GB2312","string");------->转码后变为"string = 甸 \x00".
lr_convert_string_encoding("\u8bef","UNICODE","UTF-8","string");--------->转码后变为"string = 鐢告墺锟\xbd\x00".
lr_convert_string_encoding("\u8bef","UNICODE","UTF-16","string");-------->转码后变为"string = \xff\xfe8ueb\xfd\xff\x00".
lr_convert_string_encoding("\u8bef","ucs-2","GBK","string");--------------->转码后变为"string = ?敢f?畜敳獲..[大段乱码省略]..慜浤湩?c\x00".
lr_convert_string_encoding("\u8bef","ucs-4","GBK","string");--------------->转码后变为"string = ??\x00".
....
试了很多组合,均无法将unicode的字符转为中文,是否是这个函数不支持?
哪位大侠帮我调试下,可以用lr_convert_string_encoding函数,将unicode字符例如:\u8bef 转成正常的中文汉字?
|
|