ID:               41147
 User updated by:  teracci2002 at yahoo dot co dot jp
 Reported By:      teracci2002 at yahoo dot co dot jp
-Status:           Feedback
+Status:           Open
 Bug Type:         mbstring related
 Operating System: Linux
 PHP Version:      5.2.1
 New Comment:

If the data is NOT valid, FALSE should be returned, I guess.
But actually it returns TRUE.
Am I wrong or missing your point?


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

[2007-04-20 09:27:44] [EMAIL PROTECTED]

Please explain why do you think it should succeed if the data is
invalid.

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

[2007-04-20 09:21:42] teracci2002 at yahoo dot co dot jp

Description:
------------
mb_check_encoding returns true when specific invalid EUC-JP / Shift_JIS
/ UTF-8 char sequence supplied.


Reproduce code:
---------------
//(1)
var_dump(mb_check_encoding("\x00\xA1", "EUC-JP"));
//(2)
var_dump(mb_check_encoding("\x00\x81", "Shift_JIS"));
//(3)
var_dump(mb_check_encoding("\x00\xE3", "UTF-8"));

Expected result:
----------------
//(1)
bool(false)
//(2)
bool(false)
//(3)
bool(false)

Actual result:
--------------
//(1)
bool(true)
//(2)
bool(true)
//(3)
bool(true)



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


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

Reply via email to