Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display unicode characters in midlet

 
lady eowen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my midlet, i have a string = "Prüfung" and I need to display this in my phone/emulator as "Pr�fung"

How do I display the named entity i.e. ü to using the limited IO classes in J2ME?

Any help would be greatly appreciated. Thanks.
[ June 10, 2004: Message edited by: lady eowen ]
 
lady eowen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that the umlaut character (�) is not a unicode but my question still stands because the data i will be displaying are queried from the db and sometimes, i have to display chinese and vietnamese characters also

 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are talking about encoding byte arrays to Strings. You can use the String constructor that takes the "enc" parameter.

If your phone supports the specific language you want to display, the string will be displayed correctly. For non-English phones, you can typically select the language mode from the native menus.
[ June 11, 2004: Message edited by: Michael Yuan ]
 
Pavel Kubal
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I had maybe similar problem with Czech language. I solved it with this method.

 
lady eowen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pavel, thanks for the input but I'm looking for a dynamic solution because I I might forget or omit to include other unicode characters especially Vietnamese and Chinese characters.
[ June 14, 2004: Message edited by: lady eowen ]
 
lady eowen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. i got the solution now from this link:
http://www.i18nfaq.com/java.html#8

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic