Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 41436
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: krasnoroot [...] mail.ru
Cc:
AdminCc:

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



Subject: Bug: incorrect handling of non-ASCII strings
Date: Thu, 04 Dec 2008 01:39:58 +0500
To: bug-Tk [...] rt.cpan.org
From: Alexander Krasnorutsky <krasnoroot [...] mail.ru>
Hello! I think that I have found a bug which may be illustrated by the following code: #=========================== use Tk; $m = new MainWindow; $s = "\x90"; $b = $m->Label->pack; $s =~ /(.)/; $b->configure(-text, $1); MainLoop #=========================== Output: ===================================== Tcl_GetStringFromObj @ 561 not utf8 SV = PVMG(0x857ac18) at 0x85aebbc REFCNT = 4 FLAGS = (GMG,SMG,READONLY,pPOK) IV = 0 NV = 0 PV = 0x883a688 "\220"\0 CUR = 1 LEN = 3 MAGIC = 0x85afbe0 MG_VIRTUAL = &PL_vtbl_sv MG_TYPE = PERL_MAGIC_sv(\0) MG_OBJ = 0x85aebb0 MG_LEN = 1 MG_PTR = 0x85afc00 "1" Aborted ====================================== Such code works fine if $s character code is less than 0x80. Tk 804.028; perl 5.8.6 ====================================== Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux ====================================== Regards -- Alexander Krasnorutsky.
On Thu Dec 04 14:08:20 2008, krasnoroot@mail.ru wrote: Show quoted text
> Hello! > > I think that I have found a bug which may be illustrated by the > following code: > > #=========================== > use Tk; > $m = new MainWindow; > $s = "\x90"; > $b = $m->Label->pack; > $s =~ /(.)/; > $b->configure(-text, $1); > MainLoop > #=========================== > > Output: > ===================================== > Tcl_GetStringFromObj @ 561 not utf8 > SV = PVMG(0x857ac18) at 0x85aebbc > REFCNT = 4 > FLAGS = (GMG,SMG,READONLY,pPOK) > IV = 0 > NV = 0 > PV = 0x883a688 "\220"\0 > CUR = 1 > LEN = 3 > MAGIC = 0x85afbe0 > MG_VIRTUAL = &PL_vtbl_sv > MG_TYPE = PERL_MAGIC_sv(\0) > MG_OBJ = 0x85aebb0 > MG_LEN = 1 > MG_PTR = 0x85afc00 "1" > Aborted > ====================================== > > Such code works fine if $s character code is less than 0x80. > > Tk 804.028; perl 5.8.6 > ====================================== > Characteristics of this binary (from libperl): > Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS > USE_LARGE_FILES PERL_IMPLICIT_CONTEXT > Built under linux > ====================================== >
For the record: I can reproduce the error with 5.8.8 and 5.8.9 on FreeBSD, but not with perl 5.10.0. So it is possible that some perl bug was fixed in the meanwhile. But it would be nice to have the problem at least workarounded also for 5.8.x. Regards, Slaven
There's now a workaround to avoid the abort(), implemented with change 12176. Regards, Slaven