Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2006

Tip: Looking for answers? Try searching our database.

Can't get pound sign in command prompt apps

Thread view: 
Chris Clarke - 19 Mar 2006 11:03 GMT
Can anyone help? I can't seem to get a pound sign in my command prompt
applications. I tried:

static double x=100;
public static void main(String[] args) {
 NumberFormat formatter = NumberFormat.getCurrencyInstance(Locale.UK);
       System.out.println(formatter.format(x));
}

but instead of the £ sign I get a u with an accent over it. What should I
do?

Signature

Visit http://uk.geocities.com/brilliant_moves/ for chess, Mastermind, Tetris
and many more original Applets with source code. Enjoy!

Rob Skedgell - 19 Mar 2006 12:34 GMT
> Can anyone help? I can't seem to get a pound sign in my command prompt
> applications. I tried:
[quoted text clipped - 8 lines]
> but instead of the  sign I get a u with an accent over it. What
> should I do?

I think you caaan run CMD.EXE with the /u switch (assuming that you're
running 2000/XP rather than 98/ME) for Unicode output. See
<http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/c
md.mspx
>

I don't run MS here, so I can't check this, but does it work if you try
running it as something like this (assuming that your class is called
"MyClass")?

cmd /u /c java MyClass

Hopefully someone who does run Windows can suggest some better way of
doing this - there may be a control panel setting to switch it on all
the time, or (possibly safer) just for the JRE/JDK tools.

Signature

Rob Skedgell <rob+news@nephelococcygia.demon.co.uk>
GnuPG/PGP: 7DA3 1579 C0DD 8748 C05A  B984 E2A2 3234 D14B 6DD7

Roedy Green - 19 Mar 2006 18:57 GMT
On Sun, 19 Mar 2006 10:03:39 +0000 (UTC), "Chris Clarke"
<chris.clarke2004@btinternet.com> wrote, quoted or indirectly quoted
someone who said :

>but instead of the £ sign I get a u with an accent over it. What should I
>do?

test your font.  Does it print a Unicode pound sign correctly.  What
is the character numerically being handed you?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.