Re: utf8 bug ?



On Fri, 2004-09-03 at 11:08, Quentin wrote:
On Fri, 2004-09-03 at 05:03, muppet wrote:
specifically, it is upgrading the scalar to utf8; gtk+ requires strings 
in utf8.

for the most part, you'll want to use utf8 in your source code in the 
first place.  if you can't have the strings be modified (e.g., they're 
actually owned by other code), try copying them.

But it's very counter-intuitive in code like that :

While it may be counter intuitive, non ascii chars wouldn't work at all
it we didn't do the upgrade. In a perfect world you wouldn't even notice
it :-)

$ref=$Songs[$ID];
$store->set ($iter,0,$ref->[0],1,$ref->[5],2,$ref->[8]);

the big hash of array has some values utf8-ed and then I use this values
somewhere else an I get "panic: sv_pos_b2u: bad offset" in innocent
looking code like this :

This is a bug in perl - which may have been fixed in the latest releases
(5.8.5 had a bunch of regexp vs utf8 fixes).

Can you test with perl 5.8.5 and report back? If the problem persists I
will pester one of the perl5-porters to fix it.

./borup




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]