develooper Front page | perl.perl5.porters | Postings from July 2000

Re: [ID 20000322.018] named chars aren't magical enough

Thread Previous
From:
Jarkko Hietaniemi
Date:
July 31, 2000 11:12
Subject:
Re: [ID 20000322.018] named chars aren't magical enough
Message ID:
20000728191445.A11331@chaos.wustl.edu
On Wed, Mar 22, 2000 at 06:37:42PM -0700, root wrote:
> 
> This is a bug report for perl from joseph@5sigma.com,
> generated with the help of perlbug 1.27 running under perl v5.5.670.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> use charnames qw(:full);
> use utf8;
> 
> my $x = "\x{221b}";
> my $named = "\N{CUBE ROOT}";
> 
> print "ord x = ", ord($x), "\n";
> print "chars in x = ", join(' ', unpack 'C*', $x), "\n";
> 
> print "ord named = ", ord($named), "\n";
> print "chars in named = ", join(' ', unpack 'C*', $named), "\n";
> 
> produces the output
> 
> ord x = 8731
> chars in x = 226 136 155
> ord named = 226
> chars in named = 226 136 155
> 
> [Please do not change anything below this line]
> -----------------------------------------------------------------

(going over utf8 bugs) FYI: this seems to have been fixed in perl
5.6.0.  Just to make certain it stays away I added a test to the
t/lib/charnames.t

(bug-walkers, take note)

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

Thread Previous


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