[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
POSIX gettext(): Use of LANGUAGE in the POSIX locale
From: |
Bruno Haible |
Subject: |
POSIX gettext(): Use of LANGUAGE in the POSIX locale |
Date: |
Thu, 12 May 2022 01:23:36 +0200 |
https://posix.rhansen.org/p/gettext_draft
Line 65
"The locale names in LANGUAGE shall take precedence over <...>"
Issue: If this is true in all cases, then
1) programs such as 'diff'
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html
- which are forced to produce a specific output in the POSIX locale -
will have to explicitly test for the POSIX locale, for example by
doing
const char *fmt =
(in_posix_locale () ? "Only in %s: %s\n" : gettext ("Only in %s: %s\n"));
2) for many languages, which use non-ASCII characters, the output
will contain many question marks, due to transliteration, because the
POSIX locale, on many systems, comes with the ASCII encoding.
Suggestion: Change
"over <...>"
to
"over <...>, if the latter is not the POSIX locale"
Remark: This is how GNU gettext behaves for over 20 years.
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=gettext-runtime/intl/dcigettext.c;h=e7cb9b962a9a6b8e9ccf4a4a249b41517f857f26;hb=HEAD#l1626
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- POSIX gettext(): Use of LANGUAGE in the POSIX locale,
Bruno Haible <=