ID:               46131
 Updated by:       [EMAIL PROTECTED]
 Reported By:      areid at lumerical dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         mbstring related
 Operating System: RHEL5
 PHP Version:      5.2.6
-Assigned To:      
+Assigned To:      hirokawa
 New Comment:

Assigned to the maintainer.


Previous Comments:
------------------------------------------------------------------------

[2008-09-19 20:16:36] areid at lumerical dot com

Description:
------------
The mb_check_encoding function returns false when a particular Japanese
character is used with the iso-2022-jp character set. The offending
character has hex code 2d6a. This is a special character representing
"incorporated". The character itself does not seem to be in the JIS X
0208-1983 character table, but most windows applications seem to
recognize it (Outlook, Firefox, Explorer, etc). In this particular case,
the original text was composed in Outlook.

Reproduce code:
---------------
//This is valid iso-2022-jp code for
//this single Japanese character representing incorporated
$txt = "\x1b\x24\x42\x2d\x6a";

//The output of the below code will be "bad encoding"
if(mb_check_encoding($txt,'ISO-2022-JP')){
        echo 'good encoding';
}else{
        echo 'bad encoding';


Expected result:
----------------
"good encoding" should be printed

Actual result:
--------------
"bad encoding" is printed


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46131&edit=1

Reply via email to