Re: text representation in gtk+ 1.3.x



tajima <hidetoshi tajima eng sun com> writes:

> I have a question in gtk+'s UTF-8 switching related to message localization
> with gettext().
> 
> In 1.2.x, gtk widgets take native encoding for text representation in
> public APIs such as gtk_label_set_text, gtk_entry_set_text, but in
> 1.3.x, they always take "UTF-8" encoding, and my understanding is
> applications must take care of code conversion to "UTF-8" to use these
> APIs.
> 
> If bind_textdomain_codeset() is available, it won't have much impact,
> but we cannot assume it is always the case, so a sample gtk programming
> to take care of other case will become like below. 

As Robert says, the way we are handling this is by using UTF-8 encoded
message files. Calling bind_textdomain_codeset() is needed to avoid
having new versions of gettext translate the messages _back_ into
the native encoding but not otherwise.

Regards,
                                        Owen




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