ID: 46794 Updated by: [EMAIL PROTECTED] Reported By: sohel62 at yahoo dot com -Status: Open +Status: Bogus Bug Type: Output Control Operating System: Win 2000 PHP Version: 5.2.7 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php addslashes only deals with bytes, and has no notion about character sets. Therefore it doesn't know it deals with Shift_JIS and can not escape those with addslashes properly. This is something that will be addressed in PHP 6. Previous Comments: ------------------------------------------------------------------------ [2008-12-08 06:29:01] sohel62 at yahoo dot com Description: ------------ When I tried to use addslashes() function before store data into the database for the following string and the string was encoded as Shift_JIS that was broken. ç´¹ä»äºå®æ´¾é£ Except that string there are some other characters also show mojibake too. Best regard Taslim Sohel Reproduce code: --------------- echo addslashes('ç´¹ä»äºå®æ´¾é£'); Expected result: ---------------- ç´¹ä»äº\å®æ´¾é£ Actual result: -------------- ç´¹ä»äºå®æ´¾é£ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46794&edit=1