You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Zhang Shiqian <sh...@wizitsoft.com> on 2009/12/25 02:39:20 UTC

about chinese encoding

hi all,

When i use the XML Data Import function, the xml file which contains Chinese
charactors was imported successfully, but when i checked the data in the
pages, the Chinese charactors were replaced with '??',  the file encoding is
utf-8, and the xml header encoding also 'utf-8', i tried to copy the content
in the XML data import page directly, but it not work, does anyone know how
to solve this problem? Thanks.

-- 
-- 
Regards,

Zhang Shiqian

Wizitsoft Information Technology Ltd.
www.wizitsoft.com | Phone: (8610)6267 0653 ext 604 | Mobile: (86)13264158885

Re: about chinese encoding

Posted by Shi Jinghai <sh...@langhua.cn>.
The reason is simple. It's read in ISO-8859-1, after reading, you have
to change the xml content to UTF-8. Something like:
xmlcontent = new String(xmlcontent.getBytes(), "UTF-8");

Regards,

Shi Jinghai/Beijing Langhua Ltd.


在 2009-12-25五的 09:39 +0800,Zhang Shiqian写道:
> hi all,
> 
> When i use the XML Data Import function, the xml file which contains Chinese
> charactors was imported successfully, but when i checked the data in the
> pages, the Chinese charactors were replaced with '??',  the file encoding is
> utf-8, and the xml header encoding also 'utf-8', i tried to copy the content
> in the XML data import page directly, but it not work, does anyone know how
> to solve this problem? Thanks.
> 
> --