From 659d9779b553d2e4cfb892dbfca7d63b4f85fe9e 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: whitelist iconvs with //IGNORE This test is for the behavior of iconv's magic "//IGNORE" suffix. The output it expects agrees 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 whitelist the two iconv implementations that are known to support //IGNORE. While POSIX standardizes its behavior, it falls short of requiring implementations to support it. Musl in particular does not support any suffix. --- ext/iconv/tests/bug48147.phpt | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/ext/iconv/tests/bug48147.phpt b/ext/iconv/tests/bug48147.phpt index ce304eecfb3c..434f71e517bb 100644 --- a/ext/iconv/tests/bug48147.phpt +++ b/ext/iconv/tests/bug48147.phpt @@ -2,17 +2,41 @@ 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 +44,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)