I'm sorry, probably I must count to 10  before sending a mail to the
list, because the solution was in front of me :-P 
Reading the c doc of gtk2 I've notice that if I use

self.buffer.insert(start,text,-1)

the string must be Null terminated; so I've changed that line with

self.buffer.insert(start,text,len(text))

and everythings works!
Sorry again for the spam

Pier


Il lun, 2002-03-04 alle 15:00, Pier Carteri ha scritto:
> Hi again,
> Thanks  Matt, can you tell me how to check if a file contains such
> chars, and in that case how to convert in a format that can be displaied
> on gtkTextView? (my files are usually python modules or script)
> 
> Pier
> 
> Il lun, 2002-03-04 alle 14:52, Matt Wilson ha scritto:
> > On Mon, Mar 04, 2002 at 02:50:57PM +0100, Pier Carteri wrote:
> > > 
> > > editor(pid:1549): Gtk-CRITICAL **: file gtktextbuffer.c line 476
> > > (gtk_text_buffer_emit_insert): assertion 'g_utf8_validate (text, len,
> > > NULL)' failed
> > > 
> > > The files are normal text file; where is the error?
> > 
> > They must have some high ASCII chars in there.
> > 
> > Cheers,
> > 
> > Matt
> > _______________________________________________
> > pygtk mailing list   [EMAIL PROTECTED]
> > http://www.daa.com.au/mailman/listinfo/pygtk
> 
> 
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk


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

Reply via email to