Error in reading Latin caron character(Č, č, ď, ě, ň, ř, ť, ů) in Java I18N
869367Jun 16 2011 — edited Jul 4 2011Hi,
While reading Czech characters, some of Latin characters with caron (Ex: Č, č, ď, ě, ň, ř, ť, ů), these characters displayed as '?', we tried to fix it through generate Unicode using native2ascii tool in jdk for these characters we can't generate the Unicode properly, please give us a quick solution/references/suggestions.
String czech = "Č, č, ď, ě, ň, ř, ť, ů";
try {
System.out.println("UTF-8 czech: " + new String(czech.getBytes("UTF-8"), "UTF-8"));
System.out.println("UTF-8 ascii: " + new String(asciiCzech.getBytes("8859_1"), "8859_1"));
} catch (Exception e) { e.printStackTrace();
}
The generated unicode are: \u02d9\u0163,
Note: We tried the native2ascii for Windows-1252, Cp1252, ISO-8859-1 and ISO-8859-2 encoding methods.
Please give us some solution to read this type of caron characters in Java.