Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Currency symbols not getting rendered for CSV attachment.

Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My application sends out email attachments(csv,excel,xml) with currency symbols specific to locale.
We use custom Money class to return formatted money strings. £180 etc....

The issue is,the currency symbol is not getting rendered in csv attachment files(it renders them as ?).It works fine for excel and xml.
Also,when I test it in my local env(Jboss 4.3 EAP) the symbols are rendered fine for csv attachments.But in prep env it does not work for csv.
The default charset used by local env jboss is windows-1252 while the prep env uses US-ASCII since it runs on solaris.

Any ideas??


Posts: 76479
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Parse the .csv with Java and display the text on something which supports Unicode. For example, read each line with a Scanner, and display it with a JOptionPane. You should manage that in four or five lines of code.
That will demonstrate whether the problem lies with the file and reading it, or displaying the text. I can't get Windows to display £ on a command line myself. It usually comes out as ú
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic