Re: UTF8

On tir, 2002-10-29 at 00:42, Guillaume Cottenceau wrote:
Christian Borup <borup borup com> writes:

gtk2-perl should also be setting the utf8 flag on all strings returned
by gkt+. I tried getting this to work by the attached patch, but it
really doesn't. I added SvUTF8_on to newSVgchar but for GtkEntry's at
least it doesn't work, because the get_text method doesn't use
newSVgchar... oh well. Too tired to look into it more.

Warning, newSVgchar is a wrapper to convert a newly-allocated
gchar* into a perl object, to not leak memory when calling gtk
functions that do allocate a gchar* when called. If you look at
the prototype of gtk_entry_get_text, it isn't the case, so if you
use newSVgchar is will corrupt memory and possibly segfault on

I noticed that, it segfaults allright :-)
Which is why the newSVgchar is not used for gtk_entry_get_text in my
patch. I'm thinking of adding a typemap to handle gchar, and have that
call SvUTF8_on on the SV's (obviously I'd have to change all char* to


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