[php-src] PR #22540: ext/iconv/tests/bug76249.phpt: fallback for non-GNU iconv()

From: Date: Wed, 01 Jul 2026 18:13:13 +0000
Subject: [php-src] PR #22540: ext/iconv/tests/bug76249.phpt: fallback for non-GNU iconv()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36764@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22540 Author: orlitzky Fixes one failure in https://github.com/php/php-src/issues/22413. The commit message and comment explain the rationale, but here are some references. 1. The [libiconv docs](https://www.gnu.org/savannah-checkouts/gnu/libiconv/documentation/libiconv-1.19/iconv.3.html) say that //IGNORE will ignore only untranslatable sequences; invalid sequences are an error instead. 2. The [libiconv docs](https://www.gnu.org/savannah-checkouts/gnu/libiconv/documentation/libiconv-1.19/iconv_open.3.html) **also** say that both invalid and untranslatable sequences will be ignored. Whether or not this should be an error is unclear. 3. The [glibc docs](https://sourceware.org/git/?p=glibc.git;a=blob;f=manual/charset.texi) ambiguously say "characters that cannot be converted" will be ignored, and do not mention the error status. I would interpret "characters" to mean valid characters, but I am reaching. 4. The [man-pages page for iconv_open](https://www.man7.org/linux/man-pages/man3/iconv_open.3.html) says that only untranslatable sequences are ignored. 5. [POSIX says](https://pubs.opengroup.org/onlinepubs/9799919799/functions/iconv.html) that //IGNORE should ignore both invalid and untranslatable sequences. Invalid sequences are _not_ an error in this case. 6. The [musl implementation of iconv](https://git.musl-libc.org/cgit/musl/tree/src/locale/iconv.c) does not support //IGNORE at all. 7. FreeBSD apparently uses [some other ignore mechanism](https://man.freebsd.org/cgi/man.cgi?query=iconv&sektion=3&apropos=0&manpath=FreeBSD+15.1-RELEASE+and+Ports.quarterly).

« previous php.git-pulls (#36764) next »