bug-gettext
[Top][All Lists]
Advanced

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

POSIX gettext() and iconv_open()


From: Bruno Haible
Subject: POSIX gettext() and iconv_open()
Date: Mon, 03 May 2021 23:47:56 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; )

https://posix.rhansen.org/p/gettext_split
says (line 85)

  "The conversion shall be performed as if by a call to iconv() using a
   conversion descriptor returned by iconv_open(<output codeset>,
   <messages object codeset>)."

This is NOT how GNU gettext behaves. If POSIX standardizes it like this,
GNU libc and GNU gettext will have the choice among
  (a) dropping the transliteration during charset conversion of the
      messages,
  (b) violating POSIX in this point.

I will vote for (b).

Namely, what GNU gettext does, is to allocate an iconv descriptor that
allows transliteration. For example, when converting from ISO-8859-1 or
UTF-8 to ASCII, it would transform

  "1 Empfänger"     to    "1 Empfaenger"  (glibc in German locale)
                    or    "1 Empf\"anger"  (GNU libiconv)

Suggested wording change:

  "The conversion shall be performed as if by a call to iconv() using a
   conversion descriptor that converts from the returned <messages object 
codeset>
   to the <output codeset>, with an implementation-dependent conversion
   quality."

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]