• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exporting a csv file containing Portuguese characters gets mangled when opened in excel  RSS feed

 
Rob Dennett
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks,
Rob
 
Rob Dennett
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By changing the encoding to ISO-8859-1, I made it work.

Thanks,
Rob
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the update, Rob. I suspect this is a question which other people may have in the future.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!