Search code examples
phpunicodeunicode-string

C/C++/Java source code unicode character displaying in php


I have database which contains unicode character of C/C++/Java source code.
but i want my system developed in PHP.
for example: i have string of unicode \u00c3khk\u201e\u2122r\u00d5kfk f\u00deku fku\u00bbk W\u00ed\u00c3kL\u2122 fhu Au?
now, how to decode this string with PHP


Solution

  • i have got answer to decode this string.

    $string="\u00c3khk\u201e\u2122r\u00d5kfk f\u00deku fku\u00bbk W\u00ed\u00c3kL\u2122 fhu Au?";
    $string=json_decode('"'.$string.'"');
    
    echo $string;  
    

    i prints original string.