Re: gettext usage in libraries
- From: Havoc Pennington <hp redhat com>
- To: drepper redhat com (Ulrich Drepper)
- Cc: Carlos Perelló Marín <carlos gnome-db org>, Gediminas Paulauskas <menesis delfi lt>, gnome-2-0-list gnome org, gnome-hackers <gnome-hackers gnome org>
- Subject: Re: gettext usage in libraries
- Date: 27 Nov 2001 15:44:03 -0500
Ulrich Drepper <drepper redhat com> writes:
> Havoc Pennington <hp redhat com> writes:
>
> > Ulrich presumably means either a) all users should use a UTF-8 locale
> > or b) all apps should use locale encoding, not UTF-8. Though I've
> > failed to read his mind in the past.
>
> And you fail again. Nobody here seems to understand what the
> gettext code does. Unless the environment is broken (which isn't
> normally the case anymore and if it is can be fixed in the support
> code) the functions know what conversion to make. Explicitly
> setting the charset is unnecessary at best and most of the time a
> big nuisance. The translator must have the choice as to which
> charset to use (there are still some languages which cannot be
> represented in Unicode) and the user must be able to run the
> application in whatever locale is best. The gettext functions
> handle every situation just fine without bind_textdomain_codeset
> calls.
>
What, via mind-reading? If I have an ISO-8859-1 locale, gettext is not
going to magically know this is a GTK program and it should give me
UTF-8. And in fact it doesn't, and that's why people see errors if
they don't call bind_textdomain_codeset().
We _must_ get UTF-8 encoding out of gettext, and we _must_ not require
a UTF-8 locale. I think you are disagreeing with one of those design
requirements when you make your recommendation not to use
bind_textdomain_charset(). Because without bind_textdomain_charset(),
gettext certainly does not give you UTF-8 in a non-UTF-8 locale.
If you want rationale for why we require a UTF-8 encoding in all
locales, we can have that argument separately, but given that
requirement, I don't see how to avoid telling gettext what encoding we
want.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]