-
Notifications
You must be signed in to change notification settings - Fork 4
/
289.txt
103 lines (76 loc) · 4.19 KB
/
289.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
[7] [DFN[[RUBYB[[[文字符号化]]]@en[character encoding]]]]は、
[[文字]]を[[符号化]]する一連の規則の集合です。
「[[文字コード]]」と同じように曖昧に使われていますが、
「[[文字コード]]」とは違って単一の[[文字]]の[[符号化]]を指すことはあまりなく、
[[符号化]]の方式全体を指しているようです。
* 仕様書
[REFS[
- [14] [CITE@en-US[Encoding Standard]] ([TIME[2016-04-27 20:46:26 +09:00]] 版) <https://encoding.spec.whatwg.org/>
-- [15] [CITE@en-US[Encoding Standard]] ([TIME[2016-07-29 16:12:31 +09:00]]) <https://encoding.spec.whatwg.org/#encodings>
-- [13] [CITE@en-US[Encoding Standard]] ([TIME[2016-04-27 20:46:26 +09:00]] 版) <https://encoding.spec.whatwg.org/#output-encodings>
- [12] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-04-27 02:59:24 +09:00]] 版) <https://html.spec.whatwg.org/#change-the-encoding>
- [10] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-04-27 02:59:24 +09:00]] 版) <https://html.spec.whatwg.org/#prescan-a-byte-stream-to-determine-its-encoding>
]REFS]
* 意味
[16] [DFN[[RUBYB[符号化]@en[encoding]]]]は、
[[スカラー値][Unicodeスカラー値]]の[[列]]から[[バイト列]]へ
(やその逆方向) の[[写像]]を定義するものです [SRC[>>15]]。
* 特性
[8] [[文字符号化]]は、次のような[[特性]]を持ちます。
[FIG(members list)[
: [F[名前][符号化名]] : [[Encoding Standard]] において[[符号化][文字符号化]]を識別する文字列です。
[[符号化][文字符号化]]は、[F[名前]]を1つ持ちます [SRC[>>15]]。
: [F[[[ラベル][符号化ラベル]]群]] : [[Encoding Standard]] において[[符号化][文字符号化]]に紐付けられた文字列群です。
[[符号化][文字符号化]]は、[[ラベル][符号化ラベル]]を1つ[[以上]]持ちます [SRC[>>15]]。
: [F[[[符号化器]]クラス]] :
: [F[[[復号器]]クラス]] :
]FIG]
[9] [[文字符号化]]には次のような分類があります。
[FIG(list short)[
- [[ASCII互換文字符号化]]
- [[レガシー符号化]]
- [[UTF-16符号化]]
]FIG]
* 特別な符号化
[11] いくつかの[[符号化][文字符号化]]は、[[ラベル][符号化ラベル]]が指定されても他の[[符号化][文字符号化]]と読み替えるとの特別な扱いが規定されています。
[FIG(table)[
: specified : 指定された[[符号化][文字符号化]]
: meta : [CODE(HTMLe)@en[meta]] [[要素]]での解釈 [SRC[>>12, >>10]]
: output : [[出力符号化]]としての解釈 [SRC[>>13]]
: specified : [[UTF-16BE]]
: meta : [[UTF-8]]
: output : [[UTF-8]]
: specified : [[UTF-16LE]]
: meta : [[UTF-8]]
: output : [[UTF-8]]
: specified : [[x-user-defined]]
: meta : [[windows-1252]]
: output : そのまま
: specified : [[replacement]]
: output : [[UTF-8]]
: meta : そのまま
: specified : その他
: meta : そのまま
: output : そのまま
]FIG]
* 演算
[17] [[符号化器]]、[[復号器]]を参照。
* 他の定義
[5] [[RFC 7303]] では、特定の [[XML MIME実体]]で実際に用いられている [[MIME charset]]
のことを[DFN[[RUBYB[[[文字符号化]]]@en[character encoding]]]]
(文脈で明確な場合は[DFN[[RUBYB[[[符号化]]]@en[encoding]]]]) と呼んでいます [SRC[>>4]]。
;; [6] [CODE(MIME)@en[[[charset]]]] [[引数]]や [CODE(XMLa)@en[[[encoding]]]]
[[擬似属性]]に指定されている値ではなく、実際に[[符号化]]に用いられているものを指しています。
[REFS[
- [4] [CITE@en[RFC 7303 - XML Media Types]] ([TIME[2014-07-07 20:56:43 +09:00]] 版) <http://tools.ietf.org/html/rfc7303#section-2.2>
]REFS]
* 歴史
[1] [CITE@en[(X)HTML5 Tracking]]
([TIME[2009-10-24 10:48:55 +09:00]] 版)
<http://html5.org/tools/web-apps-tracker?from=4306&to=4307>
[2] [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-CES>
[3] [CITE[Core:Character Encodings]]
( ([TIME[2014-07-22 10:45:59 +09:00]] 版))
<http://alcme.oclc.org/openurl/servlet/OAIHandler?verb=ListRecords&metadataPrefix=oai_dc&set=Core:Character+Encodings>