Edit report at http://bugs.php.net/bug.php?id=49566&edit=1
ID: 49566 Updated by: [email protected] Reported by: [email protected] Summary: addcslashes() requires strictly binary string -Status: Open +Status: Bogus Type: Bug Package: Unicode Engine related Operating System: Irrelevant PHP Version: 6SVN-2009-09-15 (snap) Block user comment: N Private report: N New Comment: The old PHP 6 is on-hold and even then this behaviour would be "Expected" as we won't know which encoding to use when converting from utf-16. Previous Comments: ------------------------------------------------------------------------ [2009-09-15 21:38:34] [email protected] Description: ------------ addcslashes() should allow Unicode string in both parameters. I use addcslashes() to escape Unicode string, for example to escape % and _ characters for SQL LIKE operator. Reproduce code: --------------- addcslashes("abc", "%_"); Expected result: ---------------- abc Actual result: -------------- Warning: addcslashes() expects parameter 1 to be strictly a binary string, Unicode string given ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=49566&edit=1
