Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

String encoding problem

 
Tiffany Sun
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To deal with MS word symbols in text input field, I'm using
tmpStr = new String(inputStr.getBytes("UTF-8"),"ISO-8859-1");
to transform the invalid byte 1 UTF-8 character to some XML safe characters.
Now I need to deal with Korean font input, if I use
tmpStr = new String(inputStr.getBytes("UTF-8"),"EUC-KR");
it can get the korean font text input correctly, but not the MS word symbols.
Is there any other trick to get around this?
Thanks
 
please buy this thing and then I get a fat cut of the action:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!