Re: PangoLayout and UTF8-strings



On Monday 21 June 2004 18:05, Carlo wrote:

Ok, this definitely closed the problem:

g_sprintf (label, "%d °C\0", (i * 50 + 550));
pango_layout_set_text (pl,
                        g_locale_to_utf8 (label,
                                          -1,
                                          NULL,
                                          NULL,
                                          NULL),
                        -1);

As far as I can see this won't work if someone else happens to use a different 
locale than you do... (not to mention that you're leaking memory there).

Cheers
 -Tim



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