If I write a file with "UNICODE" encoding, the file encoding automatically changes to "Unicode big endian" (This can be confirmed from notepads, "Save File As" options). When I open this file in MSExcel, I get a warning. This doesn't happen if I execute the above code using java5 (output files encoding remains as "UNICODE"). Why does java6 changes file encoding from "Unicode" to "Unicode big endian" ?
String line = "any thing";
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file),"UNICODE"));
This topic has been locked.
1 reply Latest Post - 2010-04-26T11:57:05Z by aasinha
Pinned topic File encoding changes in JAVA6
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-04-26T11:57:05Z at 2010-04-26T11:57:05Z by aasinha
aasinha 2700029GBF2 Posts