• 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 ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Currency symbols not getting rendered for CSV attachment.  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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??

Thanks

 
Marshal
Posts: 59762
188
  • 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 ú
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!