Posted By:
vineet_bhatia
Posted On:
Thursday, May 23, 2002 02:47 PM
We use the FileWriter object to write out files. In our application we set the system property "file.encoding" to UTF8 - System.setProperty("file.encoding", "UTF8"); This seems to work for String's and other objects. But, we are not able to write japanese characters using the FileWriter object. We see ????? in the file. Doing a getEncoding() on the FileWriter object gives Cp1252, which is the windows default encoding. Why is the behaviour of FileWriter object like this? Thanks in advance.
More>>
We use the FileWriter object to write out files.
In our application we set the system property "file.encoding" to UTF8 -
System.setProperty("file.encoding", "UTF8");
This seems to work for String's and other objects.
But, we are not able to write japanese characters using the FileWriter object. We see ????? in the file.
Doing a getEncoding() on the FileWriter object gives Cp1252, which is the windows default encoding.
Why is the behaviour of FileWriter object like this?
Thanks in advance.
<<Less