I've question about decodings There is translatsions.php like
<?php
define("LNG_T1","sdfjaö");
define("LNG_T2","õäöüåÕÄÖÜ");
define("LNG_T3","Русский");
define("LNG_T4","Українська");
define("LNG_T5","日本語");
define("LNG_T6","العربية");
?>
And there is another php-file
<?php
function startsWith($haystack, $needle) {
return !strncmp($haystack, $needle, strlen($needle));
}
require_once 'translatsions.php';
header('Content-type: text/javascript; charset=UTF-8');
$res = array();
foreach (get_defined_constants() as $k => $v) {
if (startsWith($k, "LNG_")) {
$v = preg_replace('/\'/', ''', $v);
$k = strtolower(substr($k, 4));
$res[$k] = $v;
}
}
?>
echo json_encode($res, JSON_PRETTY_PRINT) And i want to see json
{
"t1":"sdfjaö",
"t2":"õäöüåÕÄÖÜ",
"t3":"Русский",
"t4":"Українська",
"t5":"日本語",
"t6":"العربية"
}
not json like:
{
"t1": "sdfja\u00f6",
"t2": "\u00f5\u00e4\u00f6\u00fc\u00e5\u00d5\u00c4\u00d6\u00dc",
"t3": "\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
"t4": "\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
"t5": "\u65e5\u672c\u8a9e",
"t6": "\u0627\u0644\u0639\u0631\u0628\u064a\u0629"
}
Has PHP any such universal function?