php-src
php-src copied to clipboard
Unexpected result for iconv_mime_decode
Description
The following code:
<?php
echo(iconv_mime_decode('=?windows-1258?Q?DSI_Charg=E9_de_Formation_Jean_Dupont?= <[email protected]>', ICONV_MIME_DECODE_STRICT, 'UTF-8'));
Resulted in this output:
DSI Chargé de Formation Jean Dupon <[email protected]>t
But I expected this output instead:
DSI Chargé de Formation Jean Dupont <[email protected]>
Nota: On PHP 7.2.34, result is different, but still buggy.
DSI Chargé de Formation Jean Dupon <[email protected]>
PHP Version
8.1.0
Operating System
Ubuntu 20.04.1
Result is the same with PHP 7.4.27 and 8.0.15.
Indeed, the fix for bug 79200 wasn't quite right regarding iconv_mime_decode().