|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43477 Error mode ignored in unicode_decode()
Submitted: 2007-12-02 14:58 UTC Modified: 2008-03-21 15:39 UTC
From: geoffers at gmail dot com Assigned:
Status: Closed Package: Unicode Engine related
PHP Version: 6CVS-2007-12-02 (CVS) OS: Debian Etch
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: geoffers at gmail dot com
New email:
PHP Version: OS:


 [2007-12-02 14:58 UTC] geoffers at gmail dot com
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:
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-21 15:39 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 09:01:27 2023 UTC