Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

£ sign

Status
Not open for further replies.

Chivo

Programmer
Oct 25, 2006
15
GB
Hi all,

I'm having a bit of trouble with something I'm trying to do. It involves the £ sign but I can't search for help on google as it appears that what I would call a hash is referred to as a pound sign in PERL.

Anyway I have a $ and a £ in my script. When I run the perl scrips in a DOS window the $ displays fine but my £ appears as a small u with a flick above it.

My initial thought was that I need to set a county code for my DOS box but then I thought maybe I have to referece the £ sign within my script in a different way. Any help would be appreciated.

Cheers

Chivo
 
The pound sign is ascii code 156. Therefore try this:

Code:
print chr(156);
 
I've noticed that the DOS window usually has a problem displaying foreign characters and will usually show the wrong thing. If you printed £ to a text file or on a GUI window or anywhere besides the DOS console, it should display fine.

-------------
Cuvou.com | The NEW Kirsle.net
 
Thanks that worked a treat. Thanks also for the information about the DOS window.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top