如何使用php将UTF16转换为文本
我在数据库中有一列包含 UTF16 字符串。现在,我想将 UTF16 字符串转换为普通文本。如何使用 php 来实现这一点?
例如:
来源:0645 0631 062D 0628 0627 0020 0627 0644 0639 0627 0644 0645
转换:
这个 基于 Web 的工具 效果很好,但我需要一个 php 解决方案来集成到我的代码中。
谢谢。
I have one column in DB containing UTF16 string. Right now, I want to convert the UTF16 string into normal text. How to achieve this using php?
For example:
Source : 0645 0631 062D 0628 0627 0020 0627 0644 0639 0627 0644 0645
Convert : مرحبا العالم
This web based tools works wonder but i need a php solution to integrate into my code.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我从 php.net 中选择了这个,可用于转换 UTF -16 十六进制字符串转 UTF -8
I picked this from php.net and can be used to convert UTF-16 hex string to UTF -8