Convert UTF-16LE to UTF-8 in php
问题 I use iconv php function but some characters doesn't convert correctly: ... $s = iconv('UTF-16', 'UTF-8', $s); ... $s = iconv('UTF-16//IGNORE', 'UTF-8', $s); ... $s = iconv('UTF-16LE', 'UTF-8', $s); ... $s = iconv('UTF-16LE//IGNORE', 'UTF-8', $s); ... I also try mb_convert_encoding function but can't solve my problem. A sample text file: 9px.ir/utf8-16LE.rar 回答1: iconv supports the UTF-16LE encoding. You can use it to transpose the encoding from UTF-16LE to UTF-8 : $result = iconv($in_charset