'What is this encoding \u0641\u0648\u0627\u0632
When I get JSON data from server in xcode if result content arabic character it shows like this
\u0641\u0648\u0627\u0632
What encoding is this? How can i decode it ?
Solution 1:[1]
It looks like unicode characters (arabic symbols in this case)
Solution 2:[2]
$str = '\u0627\u0644\u0645\u0633\u0644\u0633\u0644 \u0627\u0644\u0646\u0627\u062f\u0631 \u062d\u0643\u0627\u064a\u0627\u062a \u0645\u062c\u0646\u0648\u0646\u0647 *\u0627\u0644\u0628\u064a\u0647 \u062a\u0628\u0639 \u0627\u0644\u0647\u064a\u0626\u0647*';
$converted = preg_replace('/\\\u([0-9a-z]{4})/i', '&#x$1;', $str);
echo $converted;
Solution 3:[3]
It is unicode character sequence, You can use the tool in the following link to Decode it
https://www.online-toolz.com/tools/text-unicode-entities-convertor.php
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Arkady |
| Solution 2 | user3050891 |
| Solution 3 | Ahmed Osama |
