Декодирование JSON 16bit UNICODE в PHP
function unenc_utf16_code_units($string) { $string = preg_replace_callback(‘/\\\\U(D[89ab][0-9a-f]{2})\\\\U(D[c-f][0-9a-f]{2})/i’, function ($matches) { $hi_surr = hexdec($matches[1]); $lo_surr = hexdec($matches[2]); $scalar = (0x10000 + (($hi_surr & 0x3FF) << 10) | ($lo_surr & 0x3FF)); return «&#x»…