Bug #61484 [Opn]: iconv //IGNORE option doesn't work anymore in PHP5.4/5.5
| From: | yohgaki@php.net | Date: | Fri, 02 Aug 2013 01:56:01 +0000 |
| Subject: | Bug #61484 [Opn]: iconv //IGNORE option doesn't work anymore in PHP5.4/5.5 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180673@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61484&edit=1
ID: 61484
Updated by: yohgaki@php.net
Reported by: juzna dot cz at gmail dot com
-Summary: iconv //IGNORE option doesn't work anymore in PHP5.4
+Summary: iconv //IGNORE option doesn't work anymore in
PHP5.4/5.5
Status: Open
Type: Bug
Package: ICONV related
-Operating System: Ubuntu
+Operating System: Linux
-PHP Version: 5.4.0
+PHP Version: 5.5.0
Block user comment: N
Private report: N
New Comment:
Fedora19 x86_64's php
php > var_dump(iconv('UTF-8', 'UTF-16//IGNORE',
"\xc5\xbea\x01b\xed\xa0\x80c\xef\xbb\xbfd\xf4\x90\x80\x80e"));
Notice: iconv(): Detected an illegal character in input string in php shell code
on line 1
bool(false)
php > echo phpversion();
5.5.0
Previous Comments:
------------------------------------------------------------------------
[2012-11-02 13:45:19] valeriy-v at yandex dot ru
PHP Version 5.4.8 Centos
Linux 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64
------------------------------------------------------------------------
[2012-09-13 08:09:50] alec at alec dot pl
The bug exists in PHP 5.3.10 and Ubuntu EGLIBC 2.15-0ubuntu10
------------------------------------------------------------------------
[2012-08-28 16:55:32] hrach dot cz at gmail dot com
PHP 5.4.6
iconv implementation libiconv
iconv library version 1.11
works!
------------------------------------------------------------------------
[2012-05-14 06:56:22] juzna dot cz at gmail dot com
The //ignore option is still broken as of the latest stable release (5.4.3).
From reading some of the other bug reports on this, apparently new versions of iconv no longer
support the //ignore option, and instead -c must be passed. So PHP needs to detect the //ignore
option and in that case pass the "-c" option to iconv.
------------------------------------------------------------------------
[2012-03-25 08:15:33] laruence@php.net
@rasmus yes, 5.3 and 5.4 behavior inconsistently, that is because icovn doesn't
accept //IGNORE anymore, and now return -1, then comes a bug(see #52211), felipe
fixed this in 5.4, but didn't fix 5.3. so now, 5.3 and 5.4 behave differently,
but the fundamental reason seems still is the glibc change their iconv behavior.
thanks, :)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=61484
--
Edit this bug report at https://bugs.php.net/bug.php?id=61484&edit=1