Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Unicode strange behaviour as a key of hash

by dave_the_m (Prior)
on Aug 14, 2017 at 19:05 UTC ( #1197376=note: print w/replies, xml ) Need Help??


in reply to Unicode strange behaviour as a key of hash

It appears to be a bug the optimisation of constant hash keys. The constant key string in $h{'Góry'} is being downgraded from utf8, whereas if you write my $g = 'Góry'; $h{$g} = 1; it works ok. Once the key is downgraded, you then run into the Unicode Bug. This can bypassed in pattern matches using the //u match modifier.

Dave.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1197376]
help
Chatterbox?
and all is calm...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2018-01-21 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (230 votes). Check out past polls.

    Notices?