如何在PHP中将utf-8字符串转换为utf-16字符串?
mbstring 支持UTF-16 ,因此您可以使用mb_convert_encoding
。
You could also use iconv
.
It's native in PHP, but require that all your text is one charset. Else it could discard characters.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.