/
341.txt
195 lines (140 loc) · 8.01 KB
/
341.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
* 仕様書
[REFS[
- [35] [CITE[The Unicode Standard, Version 13.0 - ch03.pdf]], [TIME[2020-03-09T17:53:34.000Z]], [TIME[2020-12-20T02:08:18.239Z]] <https://www.unicode.org/versions/Unicode13.0.0/ch03.pdf#G2212>
]REFS]
* 符号位置
[36]
[DFN[[RUBY[符号点][ふごうてん][code point]]]] ([DFN[コードポイント]]),
[DFN[[RUBY[符号位置][ふごういち][code position]]]]は、
[[Unicode符号空間]]上の任意の値です。
[SRC[>>35 D10]]
すなわち範囲
[ [N[0]], [N[0x10FFFF]] ]
の[[整数]]です。
[37] [CITE[The Unicode Standard]]
は
「code point」
を規定し、
「code position」
は別名としています。
[SRC[>>35 D10]]
** 古い HTML 仕様における定義
[11] 古い [[HTML]] 仕様は独自に「[[符号位置]]」という語を定義していました。現在の [[HTML]]
仕様 ([[HTML]]、[[Web Applications 1.0]]) は独自の定義を含んでいません。
[2]
>
:[DFN[[RUBYB[[[符号位置]]]@en[code position]]]]:
[[符号化文字集合]]の[[変域]]中の[[整数]]。
符号化文字集合は符号位置を[[文字]]に写像する。
;; [10] [[RFC 1866]], [[ISO‐HTML]] <http://purl.org/NET/ISO+IEC.15445/15445.html#DEFS> 4.5
** IDN2003 における定義
[1]
> [DFN[[RUBY[[[符号位置]]][ふごういち]@en[code point]]]]は、
[[符号化文字集合]]中の[[文字]]に関連付けられた[[整数値]]です。
;; [6] [[RFC 3490]] 2.、
[7] [CITE@en[RFC 3492 - Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)]]
<http://tools.ietf.org/html/rfc3492#section-2>
** IDN2008 における定義
[9]
> [DFN[[RUBYB[符号位置]@en[code point]]]]は、[[符号化文字集合]]の[RUBYB[[[符号空間]]]@en[codespace]]中の[[整数]]値です。
;; [8] [CITE@en[RFC 5890 - Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework]]
<http://tools.ietf.org/html/rfc5890#section-2.1>
** XDM における定義
[12]
> This document uses the term "code point", sometimes spelt "codepoint" (also known as "character number" or "code position") to mean a non-negative integer that represents a character in some encoding.
[5] [CITE@EN[XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition)]]
<http://www.w3.org/TR/2010/REC-xpath-functions-20101214/#string-types>
* 表記法
[17] [[Unicode]] / [[UCS]] の[[符号位置]]は、 [CODE[[[U+]]]] や [CODE[[[U-]]]]
によって[[符号位置]]を表します。
[19] [[7ビット符号]]や[[8ビット符号]]の[[ビット組合せ]]は、 [CODE[/]]
によって4ビットずつの[[十進数]]を組み合わせて表記して表します。
[18] [[JIS X 0218]] は[[短縮識別名称]]を規定していました。
[4] [[エスケープ]]も参照。
* 符号点型
[38]
[DFN[[RUBY[符号点型][ふごうてんがた][code point type]]]]は、
[[符号点]]の7つの基礎的な[[クラス]]のいずれかです。
[SRC[>>35 D10a]]
[FIG(short list)[ [39] [[符号点型]]
- [[図形][図形文字]]
- [[書式][書式文字]]
- [[制御][制御文字]]
- [[私用][私用文字]]
- [[サロゲート]]
- [[非文字]]
- [[予約][予約符号位置]]
]FIG]
[40] すべての[[符号点]]は、いずれか1つの[[符号点型]]に属します。
* 関連
[3] 「[[文字]]」、「[[符号位置]]」 (「[[code point]]」、「[[code position]]」)、「[[符号単位]]」
などはしばしば混用されます。
[13] [[Unicodeスカラー値]]は [[Unicode]] における[[符号位置]]を表す語です。
[14] [CITE@EN[XPath and XQuery Functions and Operators 3.0]]
( ([TIME[2014-04-08 07:02:07 +09:00]] 版))
<http://www.w3.org/TR/xpath-functions-3/#codepoint>
[15] [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-CCS>
[16] [CITE@en[RFC 6797 - HTTP Strict Transport Security (HSTS)]] ([TIME[2014-06-02 05:16:10 +09:00]] 版) <http://tools.ietf.org/html/rfc6797#section-4>
>
:codepoint:
is a colloquial contraction of Code Point, which is any value in
the Unicode codespace; that is, the range of integers from 0 to
10FFFF(hex) [Unicode].
[FIG(quote)[
[FIGCAPTION[
[20] [CITE[perldelta - search.cpan.org]]
( ([TIME[2016-05-10 17:56:10 +09:00]]))
<http://search.cpan.org/~rjbs/perl-5.24.0/pod/perldelta.pod>
]FIGCAPTION]
> Using code points above the platform's IV_MAX is now deprecated
> Unicode defines code points in the range 0..0x10FFFF. Some standards at one time defined them up to 2**31 - 1, but Perl has allowed them to be as high as anything that will fit in a word on the platform being used. However, use of those above the platform's IV_MAX is broken in some constructs, notably tr///, regular expression patterns involving quantifiers, and in some arithmetic and comparison operations, such as being the upper limit of a loop. Now the use of such code points raises a deprecation warning, unless that warning category is turned off. IV_MAX is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on 64-bit ones.
]FIG]
[21] [CITE@en[Editorial: start using the Infra Standard]]
([[annevk]]著, [TIME[2016-11-18 20:21:54 +09:00]])
<https://github.com/whatwg/encoding/commit/a26f76889bf393999e9caad84a3647ab09c39e09>
[22] [CITE@en[Change Unicode \u -> U+ (Fix #127)]]
([[garykac]]著, [TIME[2016-12-17 12:11:30 +09:00]])
<https://github.com/w3c/uievents/commit/2cfeb1f351f18e9eb3318563267b87b3e2e8f3f3>
[23] [CITE@en[Convert 'codepoint' to 'code point' to match the Unicode Standard]]
([[vkatsikaros]]著, [TIME[2017-01-16 23:36:01 +09:00]])
<https://github.com/w3c/webdriver/commit/a230a6144089c8a3558ea7101d2b4adb51531aa5>
[24] [CITE@en[XQuery and XPath Data Model 3.1]]
([TIME[2017-03-20 07:26:25 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-datamodel-31-20170321/#dt-codepoint>
[25] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-03-21 16:02:06 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#codepoint>
[26] [CITE@en[Improve representation guidelines for bytes and code points]]
([[annevk]]著, [TIME[2017-03-23 22:25:17 +09:00]])
<https://github.com/whatwg/infra/commit/543b2c48b6e1babb50d77e5a3ba5b86be8b56eb9>
[27] [CITE@en[Define character as alias for code point]]
([[annevk]]著, [TIME[2017-03-27 16:14:19 +09:00]])
<https://github.com/whatwg/infra/commit/034569bc45594f30a903cb348f9fde35c2a27609>
[28] [CITE@en[Define character as alias for code point by annevk · Pull Request #104 · whatwg/infra]]
([TIME[2017-03-28 18:34:52 +09:00]])
<https://github.com/whatwg/infra/pull/104>
[29] [CITE@en[Editorial: format bytes and code points per Infra]]
([[annevk]]著, [TIME[2017-03-28 21:14:42 +09:00]])
<https://github.com/whatwg/url/commit/91cb2aa532bc2b217e6237d23649aed0d2c566bb>
[30] [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>
[31] [CITE@en[Deal with the parentheses exception for code point/byte display]]
([[annevk]]著, [TIME[2017-03-30 13:25:34 +09:00]])
<https://github.com/whatwg/infra/commit/a743dbd7f1c9d6200d8eaae127aeeb85a701fb02>
[32] [CITE@en['''['''css-syntax''']''' Remove 'code point' and 'surrogate code point' in favor …]]
([[tabatkins]]著, [TIME[2017-06-10 03:59:51 +09:00]])
<https://github.com/w3c/csswg-drafts/commit/320a990184a331057a56a17cdf627fee81bdc5d3>
[FIG(quote)[
[FIGCAPTION[
[33] [CITE@EN[XSL Transformations (XSLT) Version 3.0]]
([TIME[2017-06-06 21:59:56 +09:00]])
<https://www.w3.org/TR/2017/REC-xslt-30-20170608/#analyze-string>
]FIGCAPTION]
> The term character, here as elsewhere in this specification, means a Unicode codepoint.
]FIG]
[34] [CITE@en[Allow decimals with no leading 0 as the time in refresh <meta>]]
([[domenic]]著, [TIME[2017-07-22 06:10:04 +09:00]])
<https://github.com/whatwg/html/commit/b8a34e302cdf0289f5403a02905629bb358519a6>