I have problem with converting unicode characters to utf-8. Here is my code:
<?php
$unicode = '\u0411. \u0426\u044d\u0446\u044d\u0433\u0441\u04af\u0440\u044d\u043d';
$utf8string = html_entity_decode(preg_replace("/U\+([0-9A-F]{4})/", "&#x\\1;", $unicode), ENT_NOQUOTES, 'UTF-8');
echo $utf8string;
?>
And it gives me below:
\u0411. \u0426\u044d\u0446\u044d\u0433\u0441\u04af\u0440\u044d\u043d
What did i do wrong ? any advice ?