note 69393 deleted from function.json-encode by cmb
| From: | cmb@php.net | Date: | Tue, 05 Nov 2019 14:29:39 +0000 |
| Subject: | note 69393 deleted from function.json-encode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212929@lists.php.net to get a copy of this message | ||
Note Submitter: giunta dot gaetano at sea-aeroportimilano dot it
----
Take care that json_encode() expects strings to be encoded to be in UTF8 format, while by default
PHP strings are ISO-8859-1 encoded.
This means that
json_encode(array('à ü'));
will produce a json representation of an empty string, while
json_encode(array(utf8_encode('à ü')));
will work.
The same applies to decoding, too, of course...