ID:               51060
 Updated by:       moriyo...@php.net
 Reported By:      areid at lumerical dot com
-Status:           Open
+Status:           Closed
 Bug Type:         mbstring related
 Operating System: Linux (RHEL5)
 PHP Version:      5.2.12
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php




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

[2010-02-16 20:22:45] areid at lumerical dot com

Description:
------------
I have found that mb_check_encoding returns false when I pass it a
string that I think is correctly encoded. It occurs when the string
contains Roman characters encoded in the JIS X 0201-1976 character set.
I cehcked that according to RFC 1468 this encoding is valid.
Furthermore, mb_convert_encoding is able to decode this string.

Reproduce code:
---------------
$encoded = "\x1b(JTEST";
if(!mb_check_encoding($encoded,'ISO-2022-JP')) echo "check encoding
failed\n";
echo mb_convert_encoding($encoded,'UTF-8','ISO-2022-JP')."\n";

Expected result:
----------------
I expect only the word "TEST" to be printed

Actual result:
--------------
"check encoding failed" is printed indicating that mb_check_encoding
returned FALSE. "TEST" is also printed, showing that
mb_chonvert_encoding successfully decoded the string.


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


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

Reply via email to