ZF-3395: UTF-8 values encoded with json_encode() not decodable with Zend_Json_Decoder::decode()

Issue Type: Bug Created: 2008-06-05T05:55:59.000+0000 Last Updated: 2009-03-20T07:50:55.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Lode Blomme (lode) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Json

Related issues: - ZF-4957



When a string with the following characteristics : - In UTF-8 character encoding. - Containing characters that are different when encoded in latin1 (like "é"). Is encoded to JSON with PHP buildin function json_encode(), the result contains Unicode like "&#00e9".

When this is decoded with Zend_Json_Decoder::decode(), you get an exception :

Fatal error: Uncaught exception 'Zend_Json_Exception' with message 'Illegal escape sequence 'u'' in ...Zend\Json\Decoder.php:390


Posted by clive darr (osde8info) on 2009-03-04T09:30:12.000+0000

quick fix

$ svn co…

Posted by Benjamin Eberlei (beberlei) on 2009-03-20T07:50:51.000+0000

Moved from incubator to trunk in r14399, scheduled for 1.8 release

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.