问题
How do I convert a utf-8 string to a utf-16 string in PHP?
回答1:
mbstring supports UTF-16, so you can use mb_convert_encoding.
回答2:
You could also use iconv.
It's native in PHP, but require that all your text is one charset. Else it could discard characters.
来源:https://stackoverflow.com/questions/155514/how-to-convert-a-utf-8-string-to-a-utf-16-string-in-php