开发者

J2ME app showing ???? characters after compiling

开发者 https://www.devze.com 2023-02-28 17:14 出处:网络
I am developing J2ME application and now I am in localization process. When I type russian chars in Netbeans 6.9.1 IDE it shows them well before compile but when I compil开发者_JAVA百科e and run my p

I am developing J2ME application and now I am in localization process.

When I type russian chars in Netbeans 6.9.1 IDE it shows them well before compile but when I compil开发者_JAVA百科e and run my project using WTK it shows ????? characters?

How do I change my source project configuration to make it show Unicode chars correctly ??

I don't like to write russian chars by converting them to unicode like this \u0414\u0443\u0448\u0430\u043D\u0431\u0435

HOW CAN I DO THIS?


IMO, the most likely explanation is that the Russian characters are correctly UTF-16 encoded in the application, but you are using using the JVM platform default character set / encoding when outputting them and either:

  • that doesn't support the characters, or
  • it doesn't match the default encoding of the host platform.

It is also possible that this is a source code issue, but I'd have thought that was unlikely ... assuming that you are using NetBeans to do the compilation.

If you are doing the compilation outside of NetBeans, you may need to set the Java compiler's -encoding option to tell it the actual encoding of the source files.

0

精彩评论

暂无评论...
验证码 换一张
取 消