问题
I am having trouble with the Internationalization in my java project.
When translating words from English to Chinese some characters are rendered as question marks.
public static void main(String[] args)
{
String lang="ch";
String country="CH";
Locale l=new Locale(lang,country);
ResourceBundle r = ResourceBundle.getBundle("com.neomandi.prototype/Bundle_ch_CH",l);
String val = r.getString("average");
System.out.println(st);
}
I am not able to paste the Chinese word in eclipse. When i do so it changes to \u5E73\u5747
.
回答1:
Seems like there is problem with configuration. For pasting unicode character in eclipse change the encoding to unicode. For output display unicode character in output, update run configuration.
来源:https://stackoverflow.com/questions/43472991/internationalization-when-used-to-translate-for-chinese-language