develooper Front page | perl.perl5.porters | Postings from December 2001

weird Unicode (?) bug...

Thread Next
From:
Jarkko Hietaniemi
Date:
December 21, 2001 20:43
Subject:
weird Unicode (?) bug...
Message ID:
20011222064304.F11882@alpha.hut.fi
While chasing down Unicode bugs Jeffrey found I noticed something
odd on the side:

# --->
use charnames ':full';

my $x = "\N{LATIN CAPITAL LETTER A}";
my $y = "\N{LATIN CAPITAL LETTER A}";

warn "foo" if ":$x:" =~ m/:$y:/i;
warn "bar" if ":$x:" =~ m/:$y:/;
# <---

For me this gives:

foo.
bar at /u/vieraat/vieraat/jhi/gx line 7.

Taking away the /i of the first match gives what I would have expected.
(No, I don't think A matching A is odd.  This is a modified test case.)

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

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