I'm currently doing a project where it's possible to type in data in HTML to be imploded to and JSON string in the PHP backend.
The user have two input fields: "Title" and "value".
But "value" could contain an JSON object itself which you have "Title" as index in the major object.
I do this on backend:
foreach($_POST['jsonArguments'] as $key=>$arg) { $val = $_POST['jsonArguments'][$key]; $json_parse = json_decode($val); if($json_parse) $val = $json_parse; $json[$arg] = $val; } $parser_setting_new = json_encode($json);
And when you save and refresh the page, the saved JSON settings should be show as you wrote them.
The problem comes when I try to use Scandinavian (Danish actually) characters like; æ ø å.
The word "måge" (seagull) becomes "måu005ege" because "å" is replaced with "u005e".
My question is, how to I handle this correct so that I can see the actual characters in my frontend instead of unicodes?