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

Issue Type: Bug Created: 2009-01-16T08:31:52.000+0000 Last Updated: 2012-05-03T13:00:35.000+0000 Status: Reopened Fix version(s): Reporter: Benjamin Eberlei (beberlei) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Json

  • zf-crteam-padraic
  • zf-crteam-priority

Related issues: Attachments:


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


Posted by Pádraic Brady (padraic) on 2009-12-23T05:40:05.000+0000

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

Posted by Pádraic Brady (padraic) on 2009-12-23T05:41:20.000+0000

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

Posted by Pádraic Brady (padraic) on 2011-08-20T12:21:09.000+0000

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.

Posted by Pádraic Brady (padraic) on 2011-08-20T12:34:34.000+0000

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

Posted by BitConstructor Co. Ltd. (bitconstructor) on 2012-05-03T13:00:35.000+0000

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

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.