Re: Can't convert accents on wingtk



David Dumortier <ddumortier netcourrier com> writes:

> Hello,
> 
> I developpe an application in GTK-- under Linux for Win32
> 
> I receive data from a database.
> So I put them in a Label (or Entry) and ... nothing when there's an
> accent in data.
> 
> Nethermind, I try to convert 8859_1 to CP850 characters.
> 
> So I take my string (in char *) and pass it to glib/g_convert
> g_convert returns me this message :
> "Conversion from character set '8859_1' to 'cp850' is not suppo\rted"
> 
> So I don't have a 8859_1 or cp850 character set ?
> But a copy of Entry to Label print me beautiful accents.
> 
> Please, if someone can explains this or gives me a pointer,
> or perhaps the character set to use for Win32,
> it will be great.

You should use UTF-8 as the target character set... all GTK+ widgets 
take UTF-8 strings.

(Not sure why 8859_1 to cp850 doesn't work... these aliases should
be recognized by libiconv, though the "best" names would be 
ISO-8859-1 and IBM850)

Regards,
                                        Owen



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