From 6da65c6bc1f02096ed1d022d25e5bbb642190acb Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 8 Jul 2026 13:50:15 -0400 Subject: [PATCH 1/3] .github/actions/apk/action.yml: don't install gnu-libiconv-dev If we do not install GNU libiconv, the musl libc iconv() implementation should take over, allowing it to be tested on the CI. --- .github/actions/apk/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/apk/action.yml b/.github/actions/apk/action.yml index 0cda4963a6a9..8d0fee161187 100644 --- a/.github/actions/apk/action.yml +++ b/.github/actions/apk/action.yml @@ -28,7 +28,6 @@ runs: curl-dev \ freetype-dev \ gettext-dev \ - gnu-libiconv-dev \ gmp-dev \ icu-dev \ icu-data-full \ From 139eb4c71a082df1b6d82178bce2b5c2c1667895 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 8 Jul 2026 13:59:25 -0400 Subject: [PATCH 2/3] .github/actions/configure-alpine/action.yml: drop --with-iconv arg There should be no need to pass /usr as an argument to --with-iconv now that the system (libc) implementation is being used. --- .github/actions/configure-alpine/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/configure-alpine/action.yml b/.github/actions/configure-alpine/action.yml index fe02dacfcdaf..d1b4cfea0412 100644 --- a/.github/actions/configure-alpine/action.yml +++ b/.github/actions/configure-alpine/action.yml @@ -43,7 +43,7 @@ runs: --enable-pcntl \ --with-readline \ --enable-mbstring \ - --with-iconv=/usr \ + --with-iconv \ --with-curl \ --with-gettext \ --enable-sockets \ From 659d9779b553d2e4cfb892dbfca7d63b4f85fe9e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 1 Jul 2026 22:55:56 -0400 Subject: [PATCH 3/3] 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)