|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: for-bugs at hnw dot jp
New email:
PHP Version: OS:


 [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: Fri May 29 05:01:25 2020 UTC