Skip Menu |
 

This queue is for tickets about the Sort-Key CPAN distribution.

Report information
The Basics
Id: 56605
Status: stalled
Worked: 2 hours (120 min)
Priority: 0/
Queue: Sort-Key

People
Owner: salva [...] cpan.org
Requestors: JM9991 [...] att.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: utf8 causes undef output
Date: Wed, 14 Apr 2010 16:51:59 -0700
To: <bug-Sort-Key [...] rt.cpan.org>
From: "MARTIN, JASON (ATTSI)" <JM9991 [...] att.com>
Download (untitled) / with headers
text/plain 594b
Module $VERSION = '1.28'; This is perl, v5.8.8 built for sun4-solaris-thread-multi SunOS xxx 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V440 The following code causes natsort to emit an undefined value in place of the expected array of hash keys: -------- #!/bin/perl -w Use strict; use Sort::Key::Natural qw(natsort); my $foo="abc\xc4\x80def"; utf8::upgrade($foo); my %VAR = ( $foo => 'bar' ); foreach my $key ( natsort keys %VAR ) { print $key . "\n"; } ---------- The output is: Use of uninitialized value in concatenation (.) or string at /tmp/abc.pl line 13.
Download (untitled) / with headers
text/plain 901b
Hi, thank you for reporting the bug On Wed Apr 14 19:52:24 2010, JM9991@att.com wrote: Show quoted text
> Module $VERSION = '1.28'; > This is perl, v5.8.8 built for sun4-solaris-thread-multi > SunOS xxx 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V440 > > The following code causes natsort to emit an undefined value in place of > the expected array of hash keys: > > -------- > #!/bin/perl -w > Use strict; > use Sort::Key::Natural qw(natsort); > > my $foo="abc\xc4\x80def"; > utf8::upgrade($foo); > > my %VAR = ( > $foo => 'bar' > ); > > foreach my $key ( natsort keys %VAR ) { > print $key . "\n"; > } > ---------- > The output is: > Use of uninitialized value in concatenation (.) or string at /tmp/abc.pl > line 13.
I am unable to reproduce the problem under Linux/x86 with Perl 5.8.9 (5.8.8 does not compile here anymore). Next week I will be able to try it under Solaris Sparc.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.