PDA

View Full Version : Problems populating an enty box from a disk file



theDentist
September 11th, 2006, 09:44 PM
Can anyone help me, I'm trying to fill an entry box with text from a disk file. No matter what I use, fgets(), fgetc() or fscanf(), I always have the same problem. It works perfectly up to 16 characters but if the string is more, I get the following error message in the terminal:

(files:5311): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

Any ideas
Peter
:(

scto
September 11th, 2006, 11:29 PM
hi,

there a function to convert strings do utf8.
in c++ like so:
label->set_text(Glib::locale_to_utf8(output.str()));

regards
scto

scto
September 11th, 2006, 11:33 PM
and here's the link if you program in c

http://www.gtk.org/api/2.6/glib/glib-Character-Set-Conversion.html

regards
tom

theDentist
September 12th, 2006, 02:06 PM
Thanks for the advice :)

Peter