Ticket #990 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

Cannot lookup ISO-8859 NameSpace using Unicode

Reported by: whiteknight Owned by:
Priority: normal Milestone:
Component: core Version: 1.5.0
Severity: medium Keywords: t hash namespace
Cc: Language:
Patch status: Platform:


I tried to add this test to t/pmc/namespace.t, but it failed:

    push_eh eh8
    $P0 = get_global [ unicode:"François" ], "baz"
    $I0 = isnull $P0
    is($I0, 0, "Find Sub in an ISO-8859-1 NameSpace looked up by a Unicode name")
    $S0 = $P0()
    say $S0
    is($S0, iso-8859-1:"François", "ISO-8859 NameSpace with Unicode name")
    goto end_test8
    ok(0, "Cannot find ISO-8859 NameSpace using Unicode name")


.namespace [iso-8859-1:"François"]
.sub 'baz'

I was under the impression that this should work, that we should be able to compare strings which are using different encodings. Since NameSpace delegates to Hash, I assume Hash has a similar problems (but haven't tested).

Change History

Changed 12 years ago by whiteknight

As a quick followup note, if I change the NameSpace lookup from this:

$P0 = get_global [ unicode:"François" ], "baz"

To this:

$P0 = get_global [ iso-8859-1:"François" ], "baz"

The tests both pass as expected.

Changed 12 years ago by whiteknight

NotFound++ fixed my issue.

Changed 12 years ago by whiteknight

  • status changed from new to closed
  • resolution set to fixed

Changed 12 years ago by coke

(fix was in r41118)

Note: See TracTickets for help on using tickets.