Arabic Characters in JSON decoding [duplicate]

"\u0628\u0633\u0645 \u0627\u0644\u0644\u0647" and "بسم الله" are equivalent in JSON.

PHP just defaults to using Unicode escapes instead of literals for multibyte characters.

You can specify otherwise with JSON_UNESCAPED_UNICODE (providing you are using PHP 5.4 or later).

json_encode('بسم الله', JSON_UNESCAPED_UNICODE);

Leave a Comment