Problems With Multi-Language

Hi,

I’'m a chinese and I want to translate spark into chinese.

Then I copy spark_i18n.properties to spark_i18n_zh_CN.properties in the same directory.

And Translate this file in chinese.

But When I start spark, all the chinese character displays as double question mask.

So I write some code like the following :

String s = Res.getString(“ok”) ;

System.out.println(s);

System.out.println(new String(s.getBytes(“ISO-8859-1”),“GBK”));

the second line’‘s output is wrong, the third line’'s output is correct.

What’'s goint wrong ? What should I DO to do the localization???

Message was edited by: sunny.szsuj

Hi Sunny,

please see http://www.igniterealtime.org/forum/thread.jspa?messageID=130880 as this was discussed before.

“Java expects ASCII property files and not UTF-8. So we’'re back in 1739 and need to convert UTF-8 or local encoded files to ASCII with \u-sequences.”

I did post there also a small program to convert UTF-8 to \u-encoded ASCII as I usually create UTF-8 encoded files.

LG

Thanks LG! I have got it! It works!