PHP 中的 UTF-16BE 到 ISO-8859-1

发布于 2024-08-25 11:10:10 字数 151 浏览 2 评论 0原文

我需要在 PHP 中转换 ISO-8859-1 中的 Utf-16BE(我不是编码专家,所以我不知道 Utf-16 和 Utf-16BE 是否是同一件事)。我在某处读到过使用 mb_convert_encoding 函数,但我没有该函数,因为我没有安装多字节扩展。那么您知道有替代方法吗?

i need to convert a Utf-16BE in ISO-8859-1 in PHP (i'm not an expert in encoding so i don't know if Utf-16 and Utf-16BE are the same thing). I've read somewhere to use the mb_convert_encoding function but i haven't that function because i don't have the multibyte extension installed. So do you know an alternative method to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

絕版丫頭 2024-09-01 11:10:10

还有 iconv 模块 公开 字符串 iconv ( 字符串 $in_charset , 字符串 $out_charset , 字符串 $str ) 函数。
您确实不想自己编写转换代码,请使用这两个模块之一。

There's also the iconv module exposing the string iconv ( string $in_charset , string $out_charset , string $str ) function.
You really don't want to code the conversion yourself, use one of those two modules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文