如何在 PHP 中将 UTF-16 十六进制字符串转换为 UTF-8?
我有来自 strace 的以下输出,我想使用 PHP 将其转换为 UTF-8:
R\00f6dhakev\00e4gen 4
R\00e4ntm\00e4starv\00e4gen 24
K\00d8BENHAVN
我认为上面的字符串是 UTF 16 HEX。
I have the following output from strace and i want to convert it to UTF-8 using PHP:
R\00f6dhakev\00e4gen 4
R\00e4ntm\00e4starv\00e4gen 24
K\00d8BENHAVN
The above strings is UTF 16 HEX i think.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试这个:
Try this:
发现以下函数有效:
来自 https://www.php 的某些部分。 net/manual/en/function.urldecode.php
Found that the following function works:
Some parts from https://www.php.net/manual/en/function.urldecode.php