develooper Front page | perl.perl5.porters | Postings from March 2007

Re: the utf8 flag

Thread Previous | Thread Next
From:
Dr.Ruud
Date:
March 31, 2007 05:01
Subject:
Re: the utf8 flag
Message ID:
20070331120138.24138.qmail@lists.develooper.com
Marc Lehmann schreef:

> unicode explicitly is a superset of latin1.


But there are defined differences:

$ perl -wle '(chr().chr(255)) =~ /^\s/ and $n++  and print for 0..255;
print "[$n]"'
10
12
13
32
[5]

$ perl -wle '(chr().chr(256)) =~ /^\s/ and $n++  and print for 0..255;
print "[$n]"'
10
12
13
32
133
160
[7]


perl -wle '(chr().chr(255)) =~ /^\w/ and $n++  and print for 0..255;
print "[$n]"'
...
[63]

perl -wle '(chr().chr(256)) =~ /^\w/ and $n++  and print for 0..255;
print "[$n]"'
...
[134]

-- 
Affijn, Ruud

"Gewoon is een tijger."


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About