• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display non-US currency symbols

 
Graeme Byers
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can type � (GBP) and it displays � on my screen. But the following code displays 'u' with an acute (one character). Why ? ($ USD is OK).
NumberFormat ukCF = NumberFormat.getCurrencyInstance(Locale.UK) ;
s = ukCF.format(123.45) ;
System.out.println (s) ;

My keyboard does not have a Euro symbol. How would I display it ?
A website to read will do.

Thank you.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have had the same problem, getting u-acute, and I think it has to do with the capabilities or otherwise of the Windows/DOS command prompt window. It prints � correctly on a Linux terminal or a Swing component.
For � don't know. Well, maybe altgr-4.
[Altgr is short for alternative graph.]
 
Graeme Byers
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I asked this question I felt that the full answer would be really complicated. I was not wrong. Check this http://www.dragoman.org/euro/.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it was complicated. I suspect that page may be out of date; it is dated nearly 10 years ago. Did you have any luck with altgr-4?
 
Nikos Pougounias
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may also use Ctrl + Alt + E in your favorite text processor and then just paste it in your IDE.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic