Re: what value of $LANG is required for gtk-2.0?
- From: Vlad Harchev <hvv hippo ru>
- To: gtk-devel-list gnome org
- Subject: Re: what value of $LANG is required for gtk-2.0?
- Date: Thu, 12 Apr 2001 16:18:20 +0500 (SAMST)
On 12 Apr 2001, Owen Taylor wrote:
OK, that's nice - the hack with bind_textdomain_charset() implies that gtk2
doesn't depend on any value of $LANG. This is wrong though - e.g. strftime()
or g_strftime() will return a crap (i.e. not-utf8 sequence) under non-ascii
locale if LC_TIME is not "*.utf8". So, all locale categories should be set to
"*.utf8" locales - at least on systems that support utf8 locales well.
The approach I proposed is to not require any $LANG for gtk programs, but set
all locale categories to "*.utf8" counterparts in gdk_set_locale() so that
user won't have to explicitly set $LANG and other variables for each gtk
program if it uses functions whoose return values are locale-dependant. Have
you thoroughly considered it?
>
> The $LANG situation with GTK+-2.0 is simple:
>
> All strings in GTK+-2.0 are in UTF-8.
>
> To make sure that gettext does not convert UTF-8 message strings to
> something else, if you are using a gettext with
> bind_textdomain_charset(), you must call it:
>
> ===
> # ifdef HAVE_BIND_TEXTDOMAIN_CODESET
> bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
> # endif
> ===
>
> Then, you have two options:
>
> - You can ship UTF-8 .po files
>
> - You can ship non UTF-8 .po files, but then you must require glibc-2.2 or
> GNU gettext 0.10.36.
>
> For, GTK+, we chose the first option.
>
> Regards,
> Owen
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]