Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Unicode strange behaviour as a key of hash

by dave_the_m (Monsignor)
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2019-07-17 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?