Problems With Multi-Language


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

Then I copy to 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(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 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.


Thanks LG! I have got it! It works!