I want to send json data(Arabic characters) that encoded with utf8_encode of PHP:
<?php
$output = utf8_encode('مثال');/*Arabic characters*/
echo json_encode($output);
?>
in javascript file of page :
.
.
.
const response = JSON.parse(xhr.responseText);
const div1 = document.getElementById("div1");
div1.textContent = response ;/*show ÙØ«Ø§Ù*/
.
.
.
why response value is 'ÙØ«Ø§Ù'?