Blackberry Hindi and Gujarati text display

别来无恙 提交于 2020-01-05 07:42:45

问题


I want to develop a blackberry application that supports multiple languages, such as English, Hindi and Gujarati. I have tried using utf-8 characters but it displays "??????" for Hindi. I have try also i18n but there are not possible to write in Hindi in property file. have any idea.


回答1:


The device needs to have the appropriate fonts installed to display different languages. So you would need to make sure Hindi fonts are available. It sounds like they aren't. Try going to a hindi web page, and see if the characters display correctly there.

For the resource bundle, which I think is what you mean by 'i18n', the compiler forces you to use the default java character encoding. If you're on Windows, this is CP1252. To get characters outside of that encoding, you use the Java unicode escape, which is the four digit hexidecimal encoding of the unicode code point, prefixed with '\u', such as '\u00f3'. The Eclipse editor will do this for you automatically, but if you are editing the file with another editor, this escape encoding will be required.




回答2:


Make sure you are testing your code on an actual device, and not just the simulator. I learned this the hard way. I spent many hours trying to figure out why my translated text was showing as "?????", and once I tried it on the actual device, the translations showed with no problem (japanese, chinese, russian, arabic, etc).



来源:https://stackoverflow.com/questions/5910884/blackberry-hindi-and-gujarati-text-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!