Re: Malformed UTF-8 Data in JSON [SOLVED]

From: Date: Thu, 15 Jul 2010 06:28:56 +0000
Subject: Re: Malformed UTF-8 Data in JSON [SOLVED]
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-306902@lists.php.net to get a copy of this message
On 15 Jul 2010, at 04:12, Dave M G wrote: > Yes, stripslashes() was the problem. I've removed it and the code works. > > However, it seems that when I send JSON data from a Javascript file, stripslashes() is > necessary. That's why I had it there. I'm not entirely sure what's going on there, so > obviously more experimentation is needed. Presumably, thanks to your PHP settings, you need stripslashes() on all $_GET, $_POST, and $_COOKIE input. http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc This does not apply to input from other sources. -- Benjamin Hawkes-Lewis

« previous php.general (#306902) next »