Bug #49566 [Opn->Bgs]: addcslashes() requires strictly binary string
| From: | johannes@php.net | Date: | Wed, 22 Dec 2010 14:32:03 +0000 |
| Subject: | Bug #49566 [Opn->Bgs]: addcslashes() requires strictly binary string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157261@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=49566&edit=1
ID: 49566
Updated by: johannes@php.net
Reported by: vrana@php.net
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] vrana@php.net
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