[php-src] Issue #23875: Bug GH-7980 (Unexpected result for iconv_mime_decode) [ext/iconv/tests/gh7980.phpt]
| From: | ArchMaster2024 | Date: | Thu, 24 Sep 2026 01:47:59 +0000 |
| Subject: | [php-src] Issue #23875: Bug GH-7980 (Unexpected result for iconv_mime_decode) [ext/iconv/tests/gh7980.phpt] | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252811@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/23875
Author: ArchMaster2024
### Description
The following code:
```php
$subject = '=?windows-1258?Q?DSI_Charg=E9_de_Formation_Jean_Dupont?=
<jdupont@example.fr>';
var_dump(iconv_mime_decode($subject, ICONV_MIME_DECODE_STRICT, 'UTF-8'));
<?php
```
Resulted in this output:
```
Warning: iconv_mime_decode(): Wrong encoding, conversion from "???" to "UTF-8"
is not allowed in /opt/php/8.6/php-8.6.0beta3/ext/iconv/tests/gh7980.php on line 3
bool(false)
```
But I expected this output instead:
```
string(57) "DSI Chargé de Formation Jean Dupont <jdupont@example.fr>"
```
### PHP Version
```plain
PHP 8.6.0beta3 (cli) (built: Sep 24 2026 01:10:42) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0-dev, Copyright © Zend by Perforce
with Zend OPcache v8.6.0beta3, Copyright ©, by Zend by Perforce
```
### Operating System
Fedora Linux 44 (Container Image)