wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Help with currency symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with currency symbol" Watch "Help with currency symbol" New topic
Author

Help with currency symbol

Sam England
Greenhorn

Joined: Oct 01, 2001
Posts: 2
Can someone tell me how to print a '�' from a java prog, currently it is replaced (in the output) with another symbol. This (�) is the symbol for GPB like $ is for USD.
TIA
------------------
Sam.
Coffee time now...


Sam.<BR>Coffee time now...
Martin Rennix
Ranch Hand

Joined: Sep 30, 2001
Posts: 34
Sam,
Are you writing a console or GUI app? I had the same problem runnning a console app. It's to do with the code page of your platform I think. Saying that, I tried changing the code page with the mode command (Win2000) but I still can't display a � sign.
Can anyone else help?
Martin
shilpa kulkarni
Ranch Hand

Joined: Jun 07, 2000
Posts: 87
i tried this code, it displays some funky symbol, i wonder why....
import java.text.NumberFormat;
import java.util.Locale;
NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.UK);
System.out.println("currency = "+nf.format(23.12));
Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
MMmmmm

I also tried:



and still got the output:

currency = �23.12
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
Wanna join this discussion?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with currency symbol
 
Similar Threads
identifiers
why this gives me compiler error??
getting zelo value of varibales.
Would someone be so kinds as to....
Generic question