File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes String encoding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "String encoding problem" Watch "String encoding problem" New topic

String encoding problem

Tiffany Sun

Joined: Oct 02, 2001
Posts: 26
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?

I agree. Here's the link:
subject: String encoding problem
Similar Threads
struts with character encoding problem
Garbled Symbols (send an email with Mathematical Operators)
Garbled symbols (send an email with Mathematical Operators)
Reg: Not able to read double bytes using input stream through socket
System.out Arabic Text