• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Currency symbols not getting rendered for CSV attachment.  RSS feed

Posts: 13
  • Mark post as helpful
  • send pies
  • 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: 61766
  • Mark post as helpful
  • send pies
  • 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 ú
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!