From 1b923cc70dbb65fb55d44d97177144a4e291cb4a Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 1 Jul 2026 22:55:56 -0400 Subject: [PATCH] ext/iconv/tests/bug48147.phpt: blacklist unknown iconv This test is for the behavior of iconv's magic "//IGNORE" suffix. The output it expects appears to agree with POSIX 2024 even when the underlying implementation (glibc) does not. A comment has been added to this effect, and two calls to urlencode() have been removed so that two (expected) errors are not swallowed. Afterwards we blacklist the "unknown" ICONV_IMPL, with musl in mind. Despite what POSIX says, support for //IGNORE is far from standard. We are checking for morally-correct results, however, so we opt for a blacklist rather than a whitelist of implementations. --- ext/iconv/tests/bug48147.phpt | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/ext/iconv/tests/bug48147.phpt b/ext/iconv/tests/bug48147.phpt index ce304eecfb3c..a8676fec2750 100644 --- a/ext/iconv/tests/bug48147.phpt +++ b/ext/iconv/tests/bug48147.phpt @@ -2,17 +2,44 @@ Bug #48147 (iconv with //IGNORE cuts the string) --EXTENSIONS-- iconv +--SKIPIF-- + --FILE-- --EXPECTF-- Notice: iconv(): Detected an illegal character in input string in %s on line %d @@ -20,8 +47,8 @@ bool(false) string(10) "aa%C3%B8aa" Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d -string(0) "" +bool(false) string(8) "%C3%B8aa" Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d -string(0) "" +bool(false)