Our application allows the user to export some data with to a csv file. I am writing to a string bullder and using .toString.getBytes("UTF-8") and sending those bytes to the response's output stream. If the user imports it into Excel, characters with tildes, cedillas, etc. show up fine, but if the user double-clicks the file, those characters are replaced with other characters. Is there any way to make this work for both Mac and Windows or at least Windows?
posted 7 years ago
By changing the encoding to ISO-8859-1, I made it work.