Re: Accent on GTK+



I've tried to use accentuation on a label widget and I recived this 
message when I tried to run the program:

** (teste:1100): WARNING **: Invalid UTF8 string passed to 
pango_layout_set_text()

"teste" is the application's name.
What I have to do to use accentuation?

It's been here many times - I guess those, who replied
so far are already tired ;-) You should convert strings
(containing national characters ) you pass to GTK functions 
before - to UTF8. It's also written in FAQ.

In my project in C++ I tried to speed up a little bit this 
conversion, so I wrote a very trivial class for wrapping
this conversion. I think it may help you. Unfortunately, 
operators += and = are buggy and I left them for 
debugging later... and the "later" didn't come yet :-/

Of course you can just use constructor's contents if it is the only
thing you need....

BTW, is there a replacement of string.h "strlen()" function
in GTK - to operate on a byte string (like g_utf8_strlen 
for UTF8) ?

Waldek


----------------------------------------------------------------------
Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f16ab 

Attachment: ustring.h
Description: Binary data



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