Re: Gtk2::Entry and accentuated chars



On Tue, 2003-08-19 at 15:32, Oger sia ucl ac be wrote:
Still have problems with the accentuated characters coming from a widget.

If I try to print them, everything is OK but when I try to store them to a
mysql DB, I get garbage instead of accentuated chars.
However if I define a variable containing a string with such characters I
get them correctly in the DB.

I tried to encode them to iso-8859-1 with Encode without any result.

Has anyone an idea ?

regards,


i just hacked up one of the gtk-demo scripts that uses an entry to print
out a Devel::Peek Dump on $entry->get_text. from the looks of it:

SV = PV(0x8064600) at 0x83c7890
  REFCNT = 1
  FLAGS = (TEMP,POK,pPOK,UTF8)
  PV = 0x83ef940 "sdfsdf"\0 [UTF8 "sdfsdf"]
  CUR = 6
  LEN = 7

all is well, the UTF8 flag is set and the pv is being treated as UTF8.
that being said i don't really have a way to get UTF8 data into the
string/entry. as i said before i know next to nothing about UTF8. who
did the UTF8 code in the original gtk2-perl, which is pretty much what's
being used in gtk2-perl-xs? whoever you are do you have any input on
this?

-rm





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