V2EX  ›  英汉词典

Code Unit

释义 Definition

码元 / 代码单元:在字符编码中用于表示文本的基本存储单位。例如在 Unicode 编码形式里,UTF‑8 的 code unit 是 8 位字节,UTF‑16 的 code unit 是 16 位单元,UTF‑32 的 code unit 是 32 位单元。常见情况下,一个字符(更准确说:一个 Unicode 码点)可能由一个或多个 code unit 组成(尤其在 UTF‑16 里遇到代理项时)。

发音 Pronunciation (IPA)

/ˈkoʊd ˌjuːnɪt/
/kəʊd ˈjuːnɪt/

例句 Examples

A UTF-16 code unit is 16 bits long.
UTF-16 的一个码元(code unit)长度是 16 位。

In UTF-16, some characters are represented by a pair of code units called a surrogate pair.
在 UTF-16 中,有些字符需要用一对码元(code unit)来表示,这对码元称为代理项对(surrogate pair)。

词源 Etymology

code 来自“编码/代码”的概念,unit 表示“单位”。合起来 code unit 强调“编码系统里用来存储与处理的最小单位”,常用于 Unicode 及各种文本编码的技术讨论中,用来区分 code point(码点)character(字符)、以及实际存储的单位。

相关词 Related Words

文献与作品 Literary / Notable Works

  • The Unicode Standard(Unicode 联盟标准文档)
  • Unicode Standard Annex #29: Unicode Text Segmentation
  • Unicode Standard Annex #15: Unicode Normalization Forms
  • *Programming Ruby (The Pragmatic Programmers’ Guide)*(涉及字符串/编码讨论的章节中常出现相关术语)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1983 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 12:00 · PVG 20:00 · LAX 04:00 · JFK 07:00
♥ Do have faith in what you're doing.