I am trying to write multilingual XML files through java and somehow the non-English part is not written correctly.
The XML text is being read from a database which supports UTF-8.
I have used OutputStreamWriter with Charset "UTF-8" to write to the xml file.
(While executing the Java prg in Eclipse IDE I am also printing the XML text to console.
If I change my Regional settings and select the different language , those charaters are printed
to console correctly.
If I keep my language settings to English(United States) it won't print the non-English characters properly.)
In anycase the XML file that is generated always has the non-English charaters incorrect.
Any idea to get around this?