[perl #34660] [TODO] Unicode hash keys

13 views
Skip to first unread message

Will Coleda

unread,
Apr 3, 2005, 2:03:48 PM4/3/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Will Coleda
# Please include the string: [perl #34660]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34660 >


In my test bed, I've switched tcl over to using unicode for most of its strings, so that the following tcl code:

puts "\u30b3\u30fc\u30d2\u30fc"

Generates the appropriate kana output.

However, this switchover exposed a problem with some parrot guts. While most of the tcl test suite works, the following PIR demonstrates the problem some of the remaining code is tripping over:

.sub main @MAIN
$P0 = new Integer
store_global "Foo", unicode:"Bar", $P0
print "ok 1\n"
.end

It generates the error:

unimplemented unicode
in file 'foo.pir' near line 3

The problem appears to be with using a unicode string as a hash key. After fighting with gdb for a while, I finally figured out this is due to the fact that charset/unicode.c is throwing an exception inside compute_hash.

Generating a ticket so I have somewhere to point when I make this a TODO test.

Leopold Toetsch

unread,
Apr 4, 2005, 4:12:15 AM4/4/05
to perl6-i...@perl.org
Will Coleda <parrotbug...@parrotcode.org> wrote:

> .sub main @MAIN
> $P0 = new Integer
> store_global "Foo", unicode:"Bar", $P0
> print "ok 1\n"
> .end

> It generates the error:

> unimplemented unicode

Yep. charset/unicode.c:compute_hash() *was* unimplemented.

leo

Reply all
Reply to author
Forward
0 new messages