iconv:从 UTF-16BE 转换
所有流行的 iconv 实现都支持从 UTF-16BE 转换(即具有大端字节顺序的 UTF-16)吗? GNU iconv 支持这种编码,但是其他常用的实现又如何呢?具体来说,mingw 和 *BSD 支持什么?
我应该自己做这个转换吗?
Do all popular iconv implementations support conversion from UTF-16BE (i.e. UTF-16 with big-endian byte order)? GNU iconv supports this encoding, but what about the other implementations in common use? Specifically, what do mingw and the *BSDs support?
Should I rather do this conversion myself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果这对你来说很重要,你有一个简单的出路。只需编写一个支持 UTF-16BE 的 autoconf 测试,然后在配置脚本不存在时使配置脚本失败并显示错误消息。
然后您可以花时间筛选标准,或者忘记整个问题。
由于 libiconv 是 LGPL 并支持 UTF-16BE(网站),因此您始终可以将用户引导至该网站。有一些项目包含 libiconv 而不是依赖于平台实现。
If it's a big deal for you, you have an easy way out. Just write an autoconf test for UTF-16BE support, and then make the configuration script fail with an error message if it's not present.
Then you can take your time to sift through the standards, or, just forget about the whole issue.
Since libiconv is LGPL and supports UTF-16BE (website), you can always point users to that. There are some projects that include libiconv rather than rely on platform implementations.