Unicode in WIndows and Linux

Hi

I am working on a Java web application on Linux and it is in Japanese. I have an "export to CSV file" function and use OutputStreamWriter with utf-8 encoding. Everything is fine except when I view this file in Windows Excel.. the file produces the wrong characters.

Alternatively, when I try to set the encoding to shift-jis, the file works on Windows but Linux outputs garbage characters.

Is there any way to make the CSV file work for both machine? Any help would be greatly appreciated. Thank you!

[529 byte] By [rainagamboaa] at [2007-11-26 15:46:30]
# 1
Sounds like you may have have font incompatibilities between the 2 machines. Make sure that the fonts being used in both machines are capable of displaying the characters.
ChuckBinga at 2007-7-8 22:05:53 > top of Java-index,Desktop,I18N...
# 2
With CSV files you need to use the "Import Data" function in Windows Excel to be able to specify that the data is in UTF-8, and you also need to have Excel 2003, previous versions don't have UTF-8 in the list of supported code pages.
one_danea at 2007-7-8 22:05:53 > top of Java-index,Desktop,I18N...
# 3

Thanks one_dane. I actually did some research and found out that Excel is indeed troublesome when it comest to CSV files with encoding.

The CSV file actually works on Excel if I try to save it again in ANSI encoding. So now Excel works on ANSI and Shift-JIS and Linux only recognizes Japanese when exported in UTF-8.

I don't know if there's still a work around for this or I really have to let the client do the manual encoding of the CSV files.

Microsoft is so much trouble lol.

rainagamboaa at 2007-7-8 22:05:53 > top of Java-index,Desktop,I18N...