the characters except 0x00-0x7F are not been shown when converted to "UTF-8" from "ISO-8859-1"
Posted
by Mike.Huang
on Stack Overflow
See other posts from Stack Overflow
or by Mike.Huang
Published on 2010-03-13T16:05:50Z
Indexed on
2010/03/13
16:35 UTC
Read the original article
Hit count: 254
I need to get a string from URL request of brower, and then create a text image by requested text. I know the default encoding of the Java net transmission is "ISO-8859-1", it can works normally with all characters what defined in "ISO-8859-1". But when I request a multi-byte Unicode character (e.g. chinese or something like ¤?
), then I need to decode it by "UTF-8" from "ISO-8859-1".
My codes like:
String reslut = new String(requestString.getBytes("ISO-8859-1"), "UTF-8");
Everything is fine, but I found some characters in ISO-8859-1 are not been shown now, which characters are 0x80 - 0xFF(defined in" ISO-8859-1"), i.e. the characters except 0x00-0x7F are not been shown when converted to "UTF-8" from "ISO-8859-1"
Any other method can solve this query?
© Stack Overflow or respective owner