tom arnall wrote:
I'm trying to get unicode to work in perl. When I do the 'textbook' example:
[EMAIL PROTECTED]:~$ perl -e'binmode(STDOUT, ":utf8"); print
chr(0x263a)'
I get garbage, not a smiley face, i.e.:
ΓΆΒΊ
What version of perl? (Enter `perl -v`)
perl 5.8.+ works well with UTF-8 but if your terminal is not prepare for it,
you get strange characters on the output.
Try: perl -e'binmode(STDOUT, ":utf8"); print chr(0x263a)' >tmp.text
and then: od -t x1 tmp.text
The result should be:
0000000 e2 98 ba
0000003
Then try: more tmp.text
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/