Think about Loose Coupling | |
PerlMonks |
Re^2: £ symbolsby Thelonius (Priest) |
on Jan 11, 2007 at 16:12 UTC ( [id://594190]=note: print w/replies, xml ) | Need Help?? |
In most character sets, including iso-8859-1 and Unicode, the pound symbol is 163 decimal, or 0xA3 hexadecimal, so you should use "chr(163)". If you use the correct encoding on the output, that will be translated to the correct character.
E.g. this (Code page 437 is a common code page for a DOS box on Windows, but it can be changed with CHCP.) and this gives:
But, note that 156 (0x9c) does not work with the Encode translations: Gives:
If you are outputting to HTML, you also have to make sure the Content-type charset gets set correctly or output the characters as entities, e.g. £ or £
In Section
Seekers of Perl Wisdom
|
|