Re: utf8 bug ?




On Sep 3, 2004, at 12:15 PM, Quentin wrote:

On Fri, 2004-09-03 at 15:23, Christian Borup wrote:
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.

just now while answering email, i compiled a new perl 5.8.5 and Gtk2 (all into a sandbox, so i'm presuming i got all the paths right), and i still see the panic.


-=-=-=-=-=-=-=-=-=-=-=-=-
homie:~$ ~/tmp/perl585/bin/perl
use Gtk2 '-init';
my $string='string';
my $label=Gtk2::Label->new($string);
$_='a %1 b %1';
s/%1/replace($string)/eg;
warn $_;

sub replace
{       $_=shift;
        return $_;
}

panic: sv_pos_b2u: bad byte offset at - line 5.
-=-=-=-=-=-=-=-=-=-=-=-=-


Interestingly enough, i *don't* see that if i don't use the replace sub trick. the text returned from $label->get_text should definitely have the utf8 flag on...

-=-=-=-=-=-=-=-=-=-=-=-=-
homie:~$ ~/tmp/perl585/bin/perl
use Gtk2 '-init';
my $string='string';
my $label=Gtk2::Label->new($string);
$_='a %1 b %1';
s/%1/$string/eg;
warn $_;

a string b string at - line 6.
homie:~/src/gtk2-perl-xs/Gtk2$ ~/tmp/perl585/bin/perl
use Gtk2 '-init';
my $string='string';
my $label=Gtk2::Label->new($string);
$_='a %1 b %1';
s/%1/$label->get_text/eg;
warn $_;

a string b string at - line 6.
-=-=-=-=-=-=-=-=-=-=-=-=-


homie:~$ ~/tmp/perl585/bin/perl --version

This is perl, v5.8.5 built for i686-linux-thread-multi

...




--
Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.
  -- President George W. Bush




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