IssacJones
asked on
Perl and Celsius Symbo
Hiya
Can anybody tell me how to print to the console the Celsius symbol?
John
Can anybody tell me how to print to the console the Celsius symbol?
John
print "\xB0";
ASKER
Hi group0
That does not work for me. I simply get a character that looks like a hatched rectangle. I am using Windows 7.
John
That does not work for me. I simply get a character that looks like a hatched rectangle. I am using Windows 7.
John
Apparently extended ascii and unicode character set issues are fairly common on Windows.
Can you try running the following:
You can also try entering ALT-0176 or ALT-248 and see if either outputs the proper symbol when editing the source.
Can you try running the following:
use utf8;
print "1: \x{00B0}\n";
print "2: " . chr(0x00B0) . "\n";
print "3: \x{00F8}\n";
print "4: " . chr(0x00F8) . "\n";
You can also try entering ALT-0176 or ALT-248 and see if either outputs the proper symbol when editing the source.
ASKER
hi group0
3 and 4 work!!!!
I take it that there is some connection between 0176/248 and 00B0 and 00F8. What is the connection and how to I convert between the two?
John
3 and 4 work!!!!
I take it that there is some connection between 0176/248 and 00B0 and 00F8. What is the connection and how to I convert between the two?
John
ASKER
Is there a way I can write the Perl code so it uses numbers like 248 (which I recognise) instead of the hex equivalent?
John
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.