Alexandre Fayolle wrote:
> 
> A long time ago (last millenium, that is), the supreme authority on pygtk,
> James Henstridge, wrote:
> 
> > you should be able to pass unicode strings into just about all pygtk
> > functions, and they will be converted to the default encoding."
> (http://www.mail-archive.com/[email protected]/msg01963.html)
> 
> I'm having troubles when adding unicode strings to a CTree:
>   File "c:\python20\gtk.py", line 1348, in insert_node
>     is_leaf, expanded)
> TypeError: sequence item not a string
> 
> Is this one of the pygtk functions where unicode is not handled ?

I said that about the version of pygtk I am developing for use with GTK
2.0 (which is not yet fully usable).  It does not apply to the GTK 1.2
targetted versions (however, thanks for reminding me to check through
the devel version for incorrect uses of PyString_Check though).

As I understand it, the unix version of gtk 1.2 doesn't use unicode but
the windows version does internally.

So you should be able to pass unicode UTF8 encoded strings to it.  This
can be done with the encode() method of a unicode string (I think that
is the name).  I think they call the encoding 'UTF-8'.

James.

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to