From: Sarah Hoffmann Date: Sun, 29 Mar 2015 10:55:12 +0000 (+0200) Subject: use unescaped unicode in json where supported by PHP X-Git-Tag: v2.4.0~10 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/987b6a70c999c76ffd4238575a2553370e16843e use unescaped unicode in json where supported by PHP --- diff --git a/lib/lib.php b/lib/lib.php index df65848d..2f94c25c 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -671,7 +671,10 @@ function javascript_renderData($xVal) { header("Access-Control-Allow-Origin: *"); - $jsonout = json_encode($xVal); + $iOptions = 0; + if (defined('PHP_VERSION_ID') && PHP_VERSION_ID > 50400) + $iOptions = JSON_UNESCAPED_UNICODE; + $jsonout = json_encode($xVal, $iOptions); if( ! isset($_GET['json_callback'])) {