This is the sure way to get all 8-bit characters represented in Strings:
new String(new byte[]{c}, "ISO-8859-1")
This is to do with the default encoding used by the JVM which is likely not "ISO-8859-1". On Linux, it is likely to be "UTF-8" and it is "MacRoman" on Snow Leopard (Mac).
No comments:
Post a Comment