|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesiconv.c.patch (last revision 2019-10-07 19:52 UTC by gedas at martynas dot it)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-10-07 19:52 UTC] gedas at martynas dot it
[2019-10-08 08:45 UTC] cmb@php.net
-Status: Open
+Status: Analyzed
-Assigned To:
+Assigned To: cmb
[2019-10-08 08:45 UTC] cmb@php.net
[2019-10-08 10:12 UTC] cmb@php.net
[2019-10-08 10:12 UTC] cmb@php.net
-Status: Analyzed
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 18:00:01 2025 UTC |
Description: ------------ After upgrading iconv 1.15 -> 1.16 phpinfo() shows iconv version being 1.0. /usr/local/include/iconv.h snippet: [...] 23:#define _LIBICONV_VERSION 0x0110 /* version number: (major<<8) + minor */ [...] And how php parses the version: 285:#if HAVE_LIBICONV 286: { 287: static char buf[16]; 288: snprintf(buf, sizeof(buf), "%d.%d", 289: ((_libiconv_version >> 8) & 0x0f), (_libiconv_version & 0x0f)); 290: version = buf; 291: } Till the 1.15 was all fine, as the version string was: 0x010F, after it went to 0x0110, the minor version became 0 due to the "_libiconv_version & 0x0f". Suggested change: #if HAVE_LIBICONV { static char buf[16]; snprintf(buf, sizeof(buf), "%d.%d", _libiconv_version >> 8, _libiconv_version & 0xff); version = buf; } Attaching suggested patch. Expected result: ---------------- Expected result iconv version 1.16 Actual result: -------------- Actual result iconv version 1.0