php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79200 Some iconv functions cut Windows-1258
Submitted: 2020-01-31 08:59 UTC Modified: 2020-03-03 10:42 UTC
From: thomas-php at digionline dot de Assigned: cmb (profile)
Status: Closed Package: ICONV related
PHP Version: PHP-7.3 OS: *
Private report: No CVE-ID: None
 [2020-01-31 08:59 UTC] thomas-php at digionline dot de
Description:
------------
iconv_mime_decode() cuts Windows-1258.

Test script:
---------------
echo iconv_mime_decode('=?windows-1258?Q?test=20test?=',0,'UTF-8');

Expected result:
----------------
test test

Actual result:
--------------
test tes

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-31 09:17 UTC] cmb@php.net
-Status: Open +Status: Verified -Operating System: Debian 9 + Debian 10 +Operating System: * -PHP Version: Irrelevant +PHP Version: PHP-7.3
 [2020-01-31 09:17 UTC] cmb@php.net
Confirmed: <https://3v4l.org/TKqvd>.
 [2020-02-02 09:20 UTC] cmb@php.net
-Status: Verified +Status: Suspended
 [2020-02-02 09:20 UTC] cmb@php.net
This looks like a bug in libiconv.  I've filed a bug report[1].

[1] <https://savannah.gnu.org/bugs/index.php?57723>
 [2020-03-03 10:42 UTC] cmb@php.net
-Status: Suspended +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-03-03 10:42 UTC] cmb@php.net
Oh, for some reason I didn't get a notification that the bug I've
filed upstream[1] has already been closed as not a bug.

So, it's actually the iconv extension that gets that wrong in multiple
places.  Not only iconv_mime_decode() is affected, but at least also
iconv_strlen(), iconv_strpos() and iconv_substr().

[1] <https://savannah.gnu.org/bugs/index.php?57723>
 [2020-03-03 10:42 UTC] cmb@php.net
-Summary: iconv_mime_decode() cuts Windows-1258 +Summary: Some iconv functions cut Windows-1258
 [2020-03-03 10:45 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #79200: Some iconv functions cut Windows-1258
On GitHub:  https://github.com/php/php-src/pull/5231
Patch:      https://github.com/php/php-src/pull/5231.patch
 [2020-03-23 13:33 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=32a26443052a734f7c24434497a0c9a2210607eb
Log: Fix #79200: Some iconv functions cut Windows-1258
 [2020-03-23 13:33 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 13:01:27 2024 UTC