[Top][All Lists]

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

Re: [bug-gettext] make check with gettext-0.19.6 and 0.19.5 fails more t

From: aixtools
Subject: Re: [bug-gettext] make check with gettext-0.19.6 and 0.19.5 fails more than compared to 0.19.4
Date: Fri, 23 Oct 2015 23:51:49 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

On 2015-10-23 20:28, aixtools wrote:
On 2015-10-23 20:09, aixtools wrote:

FAIL: msgcat-2

msgcat: Cannot convert from "ISO-8859-1" to "UTF-8". msgcat relies on iconv(). This version was built without iconv().
FAIL msgcat-2 (exit status: 1)

The AIX libiconv.a is considered "unsuitable" because it returns a one-byte string (" ") for the Unicode conversion of the Euro-Symbol.
While this may be your choice - calling it a "bug" is not accurate - as the official (looking) standard documentation (see http://pubs.opengroup.org/onlinepubs/009695399/functions/iconv.html)


If iconv() encounters a character in the input buffer that is valid, but for which an identical character does not exist in the target codeset, iconv() shall perform an implementation-defined conversion on this character.


The iconv() function shall update the variables pointed to by the arguments to reflect the extent of the conversion and return the number of non-identical conversions performed. If the entire string in the input buffer is converted, the value pointed to by inbytesleft shall be 0. If the input conversion is stopped due to any conditions mentioned above, the value pointed to by inbytesleft shall be non-zero and errno shall be set to indicate the condition. If an error occurs, iconv() shall return (size_t)-1 and set errno to indicate the error.


The iconv() function shall fail if:

Input conversion stopped due to an input byte that does not belong to the input codeset.
Input conversion stopped due to lack of space in the output buffer.
Input conversion stopped due to an incomplete character or shift sequence at the end of the input buffer.

The iconv() function may fail if:

The cd argument is not a valid open conversion descriptor.

What I specifically see as an official reason for returning an error - that is required! is when there is an error in the INPUT string. And specifically, when it does not exist in the output, aka target codeset - it is implementation defined - and AIX (read the IBM architect way back when) implemented as a blank space.

This is, it seems, not what GNU, or GETTEXT wants to see, but it is not a bug - just different. Documenting that way will save people like myself mucho troubles - AND - to be generous to AIX, Solaris, and HP-UX who all seem to have something to fall over in that text - a switch to permit "the consequences" would be generous.

The standards people had their reasons to let it be implementation defined - just do not ask me what they were.


reply via email to

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