Ben kodu sonraki dizisine sahip:
// characters U-00000080 - U-000007FF, mask 110XXXXX
$char= pack('C*', $ord_v, ord($string{$c + 1}));
$c += 1;
$utf16= mb_convert_encoding($char, 'UTF-16', 'UTF-8');
$ret .= sprintf('\u%04s', bin2hex($utf16));
The code is part of json encode function from json.org. What is the equivalent iconv conversion to achive the same thing? I tried iconv('UTF-8', 'UTF-16', $char); but iconv inserts a LE flag byte (I guess), and I don't know how to deal with it.
Regards, Alex