ZF-5567: Investigate Zend_Json_Encoder/Decoder::encodeUnicodeString failure on UTF-8 Chars > 65535


It seems that the algorithms for Unicode Encoding and/or Decoding fail on characters 65535.


Moving Priority to Major from N/A (may have buried it in filters). May have been recently duplicated.

Benjamin, any chance you could expand on the description perhaps with a test case or example?

Test with higher Unicode (e.g. Gothic range) but could locate no issues. Translation to/from array/strings using a mix of native and Zend_Json functions showed no translation difficulty. Given lack of reporter tests, I'm closing this as a non-issue.

Of course, would help if my last test was written correctly... Reopening. Results in garbage text on conversion.

encodeUnicodeString misses the default case in the switch on line 458. This may break the conversion for not handled cases. I got the problem with the following string: คอนเสิร์ต ไผ่ พงศธร

The issue seems to occur less if I introduce the default case and copy the char as it is