Ticket #24 (closed bug: fixed)
non-equivalence of equal Hash key strings
| Reported by: | pmichaud | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | core | Version: | |
| Severity: | medium | Keywords: | |
| Cc: | Language: | perl6 | |
| Patch status: | Platform: |
Description
Two strings of different encodings that otherwise compare as equal do not result in equivalent hash lookups:
$ cat x.pir
.sub 'main'
.local string str0, str1
str0 = unicode:"\u00ab"
str1 = iso-8859-1:"\xab"
.local pmc hash
hash = new 'Hash'
hash[str0] = 'hello'
$I0 = iseq str0, str1
print "iseq str0, str1 => "
say $I0
$S0 = hash[str0]
$S1 = hash[str1]
$I0 = iseq $S0, $S1
print "iseq hash[str0], hash[str1] => "
say $I0
.end
$ ./parrot x.pir
iseq str0, str1 => 1
iseq hash[str0], hash[str1] => 0
$
This is preventing Rakudo from being able to properly recognize the french angle brackets (U+00AB and U+00BB) in operator and other tokens.
Pm
Change History
Note: See
TracTickets for help on using
tickets.
