Reputation:
In a Java portlet I'm offering files to download through the serveResource(...) method.
I'm calling
response.getPortletOutputStream().write(byteArray);
This byte
array contains some special characters in German, for example Ä
, Ü
or ö
. The file format of the resulting file is csv.
When I'm opening the file in a text editor, the special characters are displayed correctly.
However when I open them in Microsoft Excel, they're displayed as ü
or ß
.
Do you have any ideas of what could be the cause of this problem?
Notepad++ displays the file as
ANSI as UTF-8
Upvotes: 0
Views: 3164
Reputation: 88707
This might help you: Microsoft Excel mangles Diacritics in .csv files?
Basically, you'd need to add a byte order mark (BOM) to your CSV file.
Upvotes: 1