php-src icon indicating copy to clipboard operation
php-src copied to clipboard

Unexpected result for iconv_mime_decode

Open cedric-anne opened this issue 4 years ago • 2 comments

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

cedric-anne avatar Jan 21 '22 10:01 cedric-anne

Result is the same with PHP 7.4.27 and 8.0.15.

trasher avatar Jan 21 '22 11:01 trasher

Indeed, the fix for bug 79200 wasn't quite right regarding iconv_mime_decode().

cmb69 avatar Feb 03 '22 13:02 cmb69