Re: utf8 bug ?

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 :

$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 :
where PangoEsc is 
sub PangoEsc
{ $_=$_[0];
  s/&/&amp/g; s/</&lt;g/ s/>/&gt;/g;
  return $_

(BTW does a PangoEsc-like function exist and do I miss some chars that
needs escaping ? )

And copying each argument of the $store->set(....) will probably takes
more time, and it is already slow filling such a big store.

I use perl-Gtk2-1.023-3mdk.

is there any reason you can't upgrade?  this utf8 issue hasn't changed 
since 1.0, but 1.023 is old and missing some features.
I'm just using the one from mandrake 10, I'll be upgrading when the next
community(10.1) is out.
Quentin <squentin free fr>

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