Zend Framework

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.2
  • Fix Version/s: 1.8.0
  • Component/s: Zend_Json
  • Labels:
    None

Description

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 :

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

Issue Links

Activity

Hide
Benjamin Eberlei added a comment -

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

Show
Benjamin Eberlei added a comment - Moved from incubator to trunk in r14399, scheduled for 1.8 release

People

Vote (3)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: