How do I properly set the default character encoding used by the JVM (1.5.x) programmatically?
I have read that -Dfile.encoding=whatever used to be the
-Dfile.encoding=whatever
I have tried a lot of things, but the sample code here works perfect. Link
The crux of the code is:
String s = "एक गाव में एक किसान"; String out = new String(s.getBytes("UTF-8"), "ISO-8859-1");