• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with unicode..(it seems i am missing a bit only now)  RSS feed

Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String str = "\u0aa6\u0aa6\u0aa6\u0aa6\u0aa6"; /a gujarati text
if i add to combobox then it works well ,gujarati character gets displayed.
but if i once convert it to bytes then if i again convert it back to String then it is giving me garbage string

{code}String str = "\u0aa6\u0aa6\u0aa6\u0aa6\u0aa6"; /a gujarati text
choiceGroup.append(str,null); // j2me's combobox WORKS
byte[] a= str.getBytes();
choiceGroup.append(new String(a),null); // j2me's combobox NOT WORKING
choiceGroup.append(new String(a,"UTF-8"),null); // j2me's combobox NOT WORKING{code}

here not working in the sense it is giving garbage characters.

and i need to convert it to bytes any how because i want to write it to rms.

Thanks .

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!