Bug #63450 [ReO->Dup]: iconv returns false when illegal character encountered
| From: | cmb@php.net | Date: | Fri, 29 Jul 2016 08:35:30 +0000 |
| Subject: | Bug #63450 [ReO->Dup]: iconv returns false when illegal character encountered | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202698@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63450&edit=1
ID: 63450
Updated by: cmb@php.net
Reported by: trollofdarkness at gmail dot com
Summary: iconv returns false when illegal character
encountered
-Status: Re-Opened
+Status: Duplicate
Type: Bug
Package: ICONV related
Operating System: Debian 5 Lenny
PHP Version: 5.4.8
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Indeed, that is a duplicate of bug #48147.
Previous Comments:
------------------------------------------------------------------------
[2014-02-20 22:37:35] daniel at kukiela dot pl
Hi.
Are you going to fix this?
I'm stuck with PHP 5.3...
Regards,
Daniel
------------------------------------------------------------------------
[2013-10-23 16:25:07] daniel at kukiela dot pl
...and i know, that there is glibc bug. That glibc bug causes cutting off the text. But functions
(with some kind of workaround) are usable. Bug in PHP 5.4 and 5.5 makes them completly unusable.
For example HTML Purifier can work with glibc bug (it has some kind of code to workaround this
problem - splits text in smaller chunks). But when function does not return anything, there is no
possibility to do any workaround.
Regards,
Daniel
------------------------------------------------------------------------
[2013-10-23 16:18:49] daniel at kukiela dot pl
Hi.
Will this bug be resolved?
I use PHP on Debian and i cannot upgrade Debian to version 7.x and PHP to 5.5.x (via dotdeb.org)
because of this problem.
Functions, which uses glibc (like iconv or htmlspecialchars) returns empty string.
How to test iconv:
function testIconv1(){
set_error_handler('doNothing');
$r = iconv('utf-8', 'ascii//IGNORE', "\xCE\xB1" .
str_repeat('a', 9000));
restore_error_handler();
if ($r === false) {
$code = "UNUSABLE";
} elseif (($c = strlen($r)) < 9000) {
$code = "TRUNCATES";
} elseif ($c > 9000) {
$code = "BUGGY";
} else {
$code = "OK";
}
return $code;
}
function doNothing(){}
echo testIconv1();
how to test htmlspecialchars:
var_dump(htmlspecialchars('żóÅw')); //returns an empty string
I can't upgrade serwer software because of this more than 1 year old bug.
Please, do something with that (i would like to use PHP 5.3 instead of PHP 5.3).
Regards,
Daniel
------------------------------------------------------------------------
[2013-03-07 20:00:31] ezyang@php.net
This is a dupe of https://bugs.php.net/bug.php?id=48147 (not that I
don't think it should be fixed!) Here is the glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=13541
------------------------------------------------------------------------
[2012-11-08 02:24:27] aharvey@php.net
Reopening per above. Anyone more familiar with iconv and the build system want to opine?
------------------------------------------------------------------------
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=63450
--
Edit this bug report at https://bugs.php.net/bug.php?id=63450&edit=1