unicode - 对 Joel Spolsky 的 Unicode 文章的澄清

标签 unicode encoding utf-8

我正在阅读热门文章Unicode article from Joel Spolsky还有一张图我看不懂。

  1. “十六进制最小值、十六进制最大值”是什么意思?这些值代表什么?最小值和最大值是多少?

  2. 二进制只能有 1 或 0。为什么我会在这里看到大量字母“v”?

<小时/>

<强> http://www.joelonsoftware.com/articles/Unicode.html enter image description here

<小时/>

最佳答案

十六进制最小/最大定义 unicode 字符的范围(通常由十六进制的 unicode 数字表示)。

v指的是原始数字的位数

所以第一行是这样的:

The unicode characters in the range 0 (hex 00) to 127 (hex 7F) (a 7 bit number) are represented by a 1 byte bit string starting with '0' followed by all 7 bits of the unicode number.

第二行是:

The unicode numbers in the range 128 (hex 0800) to 2047 (07FF) (an 11 bit number) are represented by a 2 byte bit string where the first byte starts with '110' followed by the first 5 of the 11 bits, and the second byte starts with '10' followed by the remaining 6 of the 11 bits

等等

希望这是有道理的

关于unicode - 对 Joel Spolsky 的 Unicode 文章的澄清,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20942469/

相关文章:

JavaScript 小书签和 URL 编码

javascript - 抓取时删除特殊字符,例如 Â

c++ - C++ 上的 UNICODE (fread) 读取文件错误

python - 如何使用 hashlib 模块修复 Unicode 编码错误?

python - 正则表达式以获取具有特定字母的所有单词列表(unicode 字素)

mysql - 将有效的 4 字节 UTF-8 序列插入 MySQL 时出错

python - 从Python unicode字符串中获取UTF-8字符代码

Delphi 2010 或 2007 用于升级 Delphi 3 项目?

c# - 从设备发送 NAudio/Opus 编码的音频作为 RTP

c++ - 在不知道 UTF-8 编码的情况下拆分空白字符上的 UTF-8 编码字符串