0

This issue as not been described on SO.

When I type in Chinese 咕噜咕噜 , I paste into Eclipse and it appears as \u5495\u565C\u5495.

This is perfect. I use it for i18n properties and it works.

I have a Chinese xml file. I am not sure of its technical origins. When I paste into or open with Eclipse, the Chinese characters appear (not the codes).

The file is blank, however, when displayed on a web page.

I have tried converting and encoding in NOtepad++. It does not seem to make a difference. I tried a web tool to convert to unicode, but it provided a different format code(&#....;&#...;)

QUESTION: How do I convert to the usable \u5495 code?

Help would be deeply appreciated

Jake
  • 4,322
  • 6
  • 39
  • 83

1 Answers1

2

One option (external to your IDE and code) is to use native2ascii, a tool provided along with the JDK.

native2ascii -encoding utf8 ./source.xml ./output.xml
Ironcache
  • 1,719
  • 21
  • 33