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

Re: Invalid UTF8 string passed to pango_layout_set_text()



On Tuesday, August 28, 2001, at 04:38  AM, Sebastian Knappe wrote:

> I'm using gtk+ 2.0 (gtk+-1.3.5, pango 0.16) and have some trouble with 
> string settings
> whenever I try to set a string to a label or something like that, that 
> contains charakters like 'äüß' etc. I get the message: Invalid UTF8 
> string passed to pango_layout_set_text()
> and gtk doesn't display the label

gtk+ 2 uses UTF-8 for all strings. If you want to include characters other 
than ASCII characters, you have to use the UTF-8 encodings. If you have to 
have a string in some other encoding, you need to convert it to UTF-8 
before passing it to gtk+ calls. Many strings should show up in UTF-8 
already.

One way to convert a string that's in some other character set is to use 
the new g_locale_to_utf8 call from <glib/gconvert.h> or one of the other 
calls in that file.

     -- Darin




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