[ 
https://issues.apache.org/jira/browse/THRIFT-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980832#comment-14980832
 ] 

ASF GitHub Bot commented on THRIFT-2779:
----------------------------------------

GitHub user phongphan opened a pull request:

    https://github.com/apache/thrift/pull/666

    THRIFT-2779: Always write unescaped JSON unicode string.

    Hi
    
    This should fixed THRIFT-2779 by always write JSON string unescaped. When 
running with PHP > 5.4, it will use `JSON_UNESCAPED_UNICODE` flag and use 
`mb_convert_encoding` when running older version of PHP.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/phongphan/thrift THRIFT-2779

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/666.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #666
    
----
commit b78bdf7622cce8970f219a641304d04ee273325d
Author: Phongphan Phuttha <[email protected]>
Date:   2015-10-29T17:00:10Z

    THRIFT-2779: Always write unescaped JSON unicode string.

----


> PHP TJSONProtocol encode unicode into UCS-4LE which can't be parsed by other 
> language bindings
> ----------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-2779
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2779
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: PHP - Library
>            Reporter: He Liangliang
>            Assignee: Jens Geyer
>            Priority: Critical
>
> TJSONProtocol serialize string using json_encode which convert unicode 
> character into UCS-4LE format, which can't be accepted by other language 
> bindings, e.g. Java library. The simplest way to fix it is change UCS-4LE 
> encoding to UTF8 encoding.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to