UTF-8 to ISO-8859-1 mapping / lossless conversion libraries in Java
Posted
by Pawel Krupinski
on Stack Overflow
See other posts from Stack Overflow
or by Pawel Krupinski
Published on 2010-03-02T12:03:57Z
Indexed on
2010/05/29
12:22 UTC
Read the original article
Hit count: 321
I need to perform a conversion of characters from UTF-8 to ISO-8859-1 in Java without losing for example all of the UTF-8 specific punctuation.
Ideally would like these to be converted to equivalents in ISO (e.g. there are probably 5 different single quotes in UTF-8 and would like them all converted to ISO single quote character).
String.getBytes("ISO-8859-1") just won't do the trick in this case as it will lose the UTF-8-specific chars.
Do you know of any ready mappings or libraries in Java that would map UTF-8 specific characters to ISO?
© Stack Overflow or respective owner