|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47399 mb_check_encoding returns true with illegal SJIS string
Submitted: 2009-02-16 00:05 UTC Modified: 2009-02-16 01:58 UTC
From: for-bugs at hnw dot jp Assigned: moriyoshi (profile)
Status: Closed Package: mbstring related
PHP Version: 5.2.9RC2 OS: any
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:
23 - 10 = ?
Subscribe to this entry?

 [2009-02-16 00:05 UTC] for-bugs at hnw dot jp
mb_check_encoding returns true when specific invalid "SJIS" or "SJIS-win" string.

Reproduce code:

var_dump(mb_check_encoding("\x81\x3A", "SJIS-win"));

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-16 00:11 UTC] for-bugs at hnw dot jp
Proposed fix is here:
 [2009-02-16 00:28 UTC]
Thanks for the patch.

Assigned to maintainer.
 [2009-02-16 01:58 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-2020 The PHP Group
All rights reserved.
Last updated: Mon May 25 21:01:25 2020 UTC