JSON_UNESCAPED_UNICODE when export in JSON #12946

kolkov opened this Issue Feb 1, 2017 · 0 comments


None yet

2 participants

kolkov commented Feb 1, 2017

Hi! Json export not good for Cyrillic in unicode.
If I add JSON_UNESCAPED_UNICODE all exported beautifully.

 if (isset($GLOBALS['json_pretty_print'])
                && $GLOBALS['json_pretty_print']
            ) {
                $encoded = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
            } else {
                $encoded = json_encode($data, JSON_UNESCAPED_UNICODE);


@nijel nijel self-assigned this Feb 2, 2017
@nijel nijel added the enhancement label Feb 2, 2017
@nijel nijel added this to the 4.8.0 milestone Feb 2, 2017
@nijel nijel added a commit that closed this issue Feb 2, 2017
@nijel nijel Allow to export JSON with unescaped unicode chars
This is optional as there are some parsers which have problems with
utf-8, see http://stackoverflow.com/q/4901133/225718

Fixes #12946

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel nijel closed this in c0bb952 Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment