Bug #18375 Updated: addslashes doesn't fit for multibyte string
| From: | Xuefer at 21cn dot com | Date: | Wed, 17 Jul 2002 05:34:33 +0000 |
| Subject: | Bug #18375 Updated: addslashes doesn't fit for multibyte string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14369@lists.php.net to get a copy of this message | ||
ID: 18375
Updated by: Xuefer@21cn.com
Reported By: Xuefer@21cn.com
-Status: Feedback
+Status: Open
Bug Type: MySQL related
Operating System: win2k
PHP Version: 4.2.1
New Comment:
of cos magic_quote_* can be turned off, but how about turnning on?
and the binary version os php or bundled libmysql in php is out dated
both addslashes() and mysql_escape_string() didn't help me to insert
binary data into mysql databse :(
may be a bug of mysql 4 ?....
after all, i'm not expert to those sources :(
Previous Comments:
------------------------------------------------------------------------
[2002-07-16 16:23:01] sniper@php.net
magic_quotes_* can be turned off, no bug there.
And if I understood correctly, mysql_escape_string()
works fine with multibyte data? So where's the bug here?
Sounds more like documentation problem..
------------------------------------------------------------------------
[2002-07-16 15:48:47] Xuefer@21cn.com
as described in manual, addslashes is for prepairing database queries
but it don't fit for mysql4.x when charset is set to multibyte, e.g.
GBK
escape/unescaping multibyte string is process differently in
mysql-client/mysqld (btw: i dunno why it need to do such way)
when a binary data addslashes() by php sent to mysqlserver,
myodbc_remove_escape
mysql_escape_string need upgraded mysql library
but addslashes is used to process GPC when magic_quote is on
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18375&edit=1