[php-src] PHP-8.6: Fix GH-23875: Skip gh7980.phpt without windows-1258 (#24789)

From: Date: Tue, 27 Oct 2026 16:46:33 +0000
Subject: [php-src] PHP-8.6: Fix GH-23875: Skip gh7980.phpt without windows-1258 (#24789)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142828@lists.php.net to get a copy of this message
Author: Juan Versolato Lopes (Truta446) Committer: Weilin Du (LamentXU123) Date: 2026-10-28T00:34:03+08:00 Commit: https://github.com/php/php-src/commit/98043f3a1cd4b7591d14d6d2cdcc25f5521dd21a Raw diff: https://github.com/php/php-src/commit/98043f3a1cd4b7591d14d6d2cdcc25f5521dd21a.diff Fix GH-23875: Skip gh7980.phpt without windows-1258 (#24789) The windows-1258 charset is optional on glibc systems and may be absent from minimal installations. When iconv cannot open it, the test fails with "Wrong encoding" instead of exercising iconv_mime_decode(). Probe support in SKIPIF and skip the test if the charset is unavailable, following the existing iconv test pattern. The test continues to run when windows-1258 is supported. Closes #24789 Changed paths: M ext/iconv/tests/gh7980.phpt Diff: diff --git a/ext/iconv/tests/gh7980.phpt b/ext/iconv/tests/gh7980.phpt index 11be9e129e02..b748c9f7cc63 100644 --- a/ext/iconv/tests/gh7980.phpt +++ b/ext/iconv/tests/gh7980.phpt @@ -2,6 +2,12 @@ Bug GH-7980 (Unexpected result for iconv_mime_decode) --EXTENSIONS-- iconv +--SKIPIF-- +<?php +if (@iconv("windows-1258", "UTF-8", "") === false) { + die("skip windows-1258 is not supported by this iconv implementation"); +} +?> --FILE-- <?php $subject = '=?windows-1258?Q?DSI_Charg=E9_de_Formation_Jean_Dupont?= <jdupont@example.fr>';

« previous php.cvs (#142828) next »