Issue Type: Bug Created: 2009-04-23T09:11:08.000+0000 Last Updated: 2011-08-20T12:40:12.000+0000 Status: Open Fix version(s): Reporter: Henry Jean (henryjean) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Json
Related issues: Attachments:
I'm translating an application to UTF-8 and I have a problem with the Zend_Json::decode().
I've json strings stored in database and they are decoded correctly on my old non UTF8 apache server.
If I run the same code with the same json string on my utf-8 apache config, I have an exception Fatal error </ b>: Uncaught exception 'Zend_Json_Exception' with message 'Missing "," in object encoding:
I tried to identify the issue and it appears when I activate the option mbstring.func_overload in my httpd.conf.
Posted by Matthew Weier O'Phinney (matthew) on 2009-04-23T09:34:17.000+0000
Is ext/json enabled on your server? i.e., are you using PHP's native JSON support, or ZF's implementation to decode the JSON string? (Zend_Json::decode() proxies to ext/json if it's enabled). This information will allow me to better track down the issue.
If you are not using ext/json, can you attempt to enable it to see if using it solves the issues?
Posted by Henry Jean (henryjean) on 2009-04-23T10:33:56.000+0000
In phpinfo, i see json enabled (version 1.2.1)
Posted by Henry Jean (henryjean) on 2009-04-23T10:43:20.000+0000
I forgot : I'm using the decoder like this : Zend_Json::$useBuiltinEncoderDecoder = true; //same exception with false $o = Zend_Json::decode($json_str); my php version : 5.2.6
Posted by Henry Jean (henryjean) on 2009-04-24T01:09:29.000+0000
I changed the value of mbstring.func_overload in php config and the problem occurs only with mbstring.func_overload=7. So only if ereg functions are overloaded
Have you found an issue?
See the Overview section for more details.