#43477 [Opn->Csd]: Error mode ignored in unicode_decode()
| From: | felipe@php.net | Date: | Fri, 21 Mar 2008 15:39:31 +0000 |
| Subject: | #43477 [Opn->Csd]: Error mode ignored in unicode_decode() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123529@lists.php.net to get a copy of this message | ||
ID: 43477
Updated by: felipe@php.net
Reported By: geoffers at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Unicode Engine related
Operating System: Debian Etch
PHP Version: 6CVS-2007-12-02 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-12-02 14:58:37] geoffers at gmail dot com
Description:
------------
Regardless of how any error mode is set, whether it be via the third
parameter of unicode_decode() or via unicode_set_error_mode(), it is
ignored and U_CONV_ERROR_STOP is used.
Reproduce code:
---------------
<?php
var_dump(unicode_decode(b"\xF8", 'UTF-8', U_CONV_ERROR_SKIP));
?>
Expected result:
----------------
string(0) ""
Actual result:
--------------
Warning: could not decode binary string (converter UTF-8 failed on
bytes
(0xF8) at offset 0) in - on line 2
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43477&edit=1