Re: addslashes(): Is it multi-byte safe?
| From: | Jean-Christian Imbeault | Date: | Sat, 01 Mar 2003 11:37:50 +0000 |
| Subject: | Re: addslashes(): Is it multi-byte safe? | ||
| References: | 1 2 | Groups: | php.general php.i18n php.i18n |
| Request: | Send a blank email to php-general+get-137681@lists.php.net to get a copy of this message | ||
Moriyoshi Koizumi wrote:
Partially yes. Strings encoded in GB2312(CP936), big5, Shift_JIS are known to be clobbered by addslashes().Sh*t ... and I just added a whole bunch of addslashes() to my code to prevent SQL attacks. And of course my web pages are for Japanese ... and most of them will be using SJIS. If I have internal_encoding set to EUC-JP does that mean that all POST or GET vars passed in will be translated to EUC-Jp and hence my addslahes will be fine? I sure hope so ... Jc