bug-gettext
[Top][All Lists]
Advanced

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

POSIX bind_textdomain_codeset(): some invalid codeset arguments


From: Bruno Haible
Subject: POSIX bind_textdomain_codeset(): some invalid codeset arguments
Date: Thu, 12 May 2022 01:33:14 +0200

https://posix.rhansen.org/p/gettext_draft
Line 573

"The application shall ensure that the codeset argument, if non-empty, is a
 valid codeset name that can be used as the tocode argument of the iconv_open()
 function."

This is not the only requirement. We also need the requirement that the NUL
character of ASCII maps to a single NUL byte in the codeset. Otherwise the
iconv() processing inside gettext() is likely to malfunction.

Suggestion: Change
"... iconv_open() function."
to
"... iconv_open() function, and that the NUL character corresponds to a
 single NUL byte in codeset. So, the codeset may not be, for example,
 "UCS-2", "UTF-16", "UTF-16BE", "UTF-16LE", "UCS-4", "UTF-32", "UTF-32BE",
 "UTF-32LE", "UTF-7"."






reply via email to

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