|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
39 - 13 = ?
Subscribe to this entry?

 [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: Wed Dec 06 05:01:28 2023 UTC