php.net |  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
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: for-bugs at hnw dot jp
New email:
PHP Version: OS:

 

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

Reproduce code:
---------------
<?php

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

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-16 00:11 UTC] for-bugs at hnw dot jp
Proposed fix is here: http://hnw.sakura.ne.jp/mb_check_encoding.47399.patch.txt
 [2009-02-16 00:28 UTC] felipe@php.net
Thanks for the patch.

Assigned to maintainer.
 [2009-02-16 01:58 UTC] moriyoshi@php.net
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.


 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Dec 16 14:01:26 2018 UTC