• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By changing the encoding to ISO-8859-1, I made it work.

Thanks,
Rob
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the update, Rob. I suspect this is a question which other people may have in the future.
 
reply
    Bookmark Topic Watch Topic
  • New Topic