about chinese encoding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

about chinese encoding

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.

--
--
Regards,

Zhang Shiqian

Wizitsoft Information Technology Ltd.
www.wizitsoft.com | Phone: (8610)6267 0653 ext 604 | Mobile: (86)13264158885
Reply | Threaded
Open this post in threaded view
|

Re: about chinese encoding

Shi Jinghai
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.
>
> --