记事本可以读取UTF-32吗? [英] Can Notepad read UTF-32?

查看:184
本文介绍了记事本可以读取UTF-32吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些字节代表UTF-32LE中的单词"hi":

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:

推荐答案

记事本不支持UTF-32,仅支持ANSI,UTF-8和UTF-16.它会将前2个字节解释为UTF-16LE BOM,而不是将前4个字节解释为UTF-32LE BOM,因此文件字节被解释为

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

代替

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

这篇关于记事本可以读取UTF-32吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆