-
Notifications
You must be signed in to change notification settings - Fork 4
/
301.txt
46 lines (33 loc) · 2.4 KB
/
301.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[1] [[UTF-16]] における一つの単位 ([[16ビット]]分の[[ビット列]]) のことを[DFN[[RUBYB[16ビット符号単位]@en[16-bit code unit]]]]といいます。
[2] [[16ビット符号単位]]は、
- [3] [[サロゲート・ペア]]以外については、ある1つの[[Unicode文字]]を表します。
- [4] [[サロゲート・ペア]]については、2つの[[16ビット符号単位]]の組によってある1つの[[Unicode文字]]を表します。
- [5] [[サロゲート・ペア]]に使用されるものが正当な組み合わせで使われていない場合、[[Unicode文字]]を表しておらず、 [[UTF-16]] として不正なものになります。
* 関連
[6] 「[[16ビット符号単位]]」は、 [[UTF-16]] において意味を持つ最短の[[ビット列]]であり、
理論上は16ビットで一つの「[[バイト]]」であると主張することも可能です。しかし実際には「[[バイト]]」
は8ビットであると考えられること、8ビットとして実装されることが多く、
従って [[UTF-16BE]] と [[UTF-16LE]] の違いが存在してしまっています。
[7] 「[[16ビット符号単位]]」はしばしば「[[文字]]」、「[[符号位置]]」、「[[Unicodeスカラー値]]」
といった類義語と混用されます。
* 歴史
[8] [CITE@en[Web Applications 1.0 r6649 Define 'code unit'.]]
( ([TIME[2011-10-07 08:30:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6648&to=6649>
[9] [CITE@en[Character Model for the World Wide Web 1.0: Fundamentals]]
( ([TIME[2005-02-15 14:24:00 +09:00]] 版))
<http://www.w3.org/TR/charmod/#def-CEF>
[FIG(quote)[
[FIGCAPTION[
[10] [CITE[JavaScript, aka. Web ECMAScript]]
([TIME[2016-03-06 22:24:23 +09:00]] 版)
<https://javascript.spec.whatwg.org/>
]FIGCAPTION]
> When this specification uses the term ECMAScript character, it means a 16-bit unsigned value used to represent a single 16-bit unit of text. '''['''ECMASCRIPT''']'''
]FIG]
[11] [CITE@en[Define JavaScript string and scalar value string]]
([[annevk]]著, [TIME[2017-03-27 16:01:49 +09:00]])
<https://github.com/whatwg/infra/commit/f1be763cfba23d2fc780b35403074c599e69616e>
[12] [CITE@en[Editorial: let code point and friends be defined by Infra]]
([[annevk]]著, [TIME[2017-03-29 17:47:15 +09:00]])
<https://github.com/whatwg/html/commit/59595d9c2ccadb9332c15048be5d30174532ee70>