如何在PHP中将utf-8字符串转换为utf-16字符串 [英] How to convert a utf-8 string to a utf-16 string in PHP

查看:584
本文介绍了如何在PHP中将utf-8字符串转换为utf-16字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在PHP中将utf-8字符串转换为utf-16字符串?

How do I convert a utf-8 string to a utf-16 string in PHP?

推荐答案

mbstring 支持UTF-16 ,因此您可以使用 mb_convert_encoding .

mbstring supports UTF-16, so you can use mb_convert_encoding.

这篇关于如何在PHP中将utf-8字符串转换为utf-16字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆