I am retrieving data from an API which is returning encoded characters. For example part of the string returned is \u2605
which is the unicode for a special symbol (a start), see link:
http://www.fileformat.info/info/unicode/char/2605/index.htm
With php i run the following code to convert the data into an array so that i can work with it:
$result = file_get_contents($url);
$decoded = json_decode($result, true)
However, the problem i have is that the unicode codes for the symbols are then converted to some giberish. For example the \u2605
is converted to ★
.
Other symboles are also converted.
What can I do here?