Can Notepad read UTF-32?

喜你入骨 提交于 2019-12-11 10:36:48

问题


These bytes represent the word "hi" in UTF-32LE:

FF FE 00 00 68 00 00 00 69 00 00 00

However this is what Notepad displays:


回答1:


Notepad does not support UTF-32, only ANSI, UTF-8, and UTF-16. It is interpreting the first 2 bytes as a UTF-16LE BOM, not the first 4 bytes as a UTF-32LE BOM, so the file bytes get interpreted as

FF FE 00 00 68 00 00 00 69 00 00 00

Instead of

FF FE 00 00 68 00 00 00 69 00 00 00



来源:https://stackoverflow.com/questions/28536709/can-notepad-read-utf-32

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!