-
Notifications
You must be signed in to change notification settings - Fork 4
/
934.txt
173 lines (128 loc) · 9.22 KB
/
934.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
[128] [DFN[[RUBYB[[[地域]]] @en[[CODE(ABNF)[region]]]]]][[部分タグ]]は、
特定の[[国]]や[[地域]]における[[言語]]のバリエーション ([[方言]]や[[綴り]]の差異など)
を表すために使うことあができます。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
;; [272] [[言語タグ]]全体については、「[[言語タグ]]」の項も参照してください。
* 仕様書
[REFS[
- [273] '''[[RFC 5646]]'''
- [276] [CITE@en-us[UTS #35: Unicode Locale Data Markup Language]] ([TIME[2011-07-19 03:14:51 +09:00]] 版)
-- [277] <http://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers>
-- [278] <http://unicode.org/reports/tr35/#Language_Locale_Field_Definitions>
]REFS]
* 呼称
[274] [[Unicode言語識別子]]、[[Unicodeロケール識別子]]では[DFN[[RUBYB[[[領土]]]@en[territory]]]]、
[DFN[[CODE[[[unicode_region_subtag]]]]]] とも呼ばれています [SRC[>>276]]。
* 構文
[129] [[地域]][[部分タグ]]は、[[言語]]、[[拡張言語]]、[[用字系]]の後で、
その他の[[部分タグ]]の前になければ[['''なりません''']]
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]。
[145] [[地域]][[部分タグ]]は複数個あっては[['''なりません''']]。
他の[[言語]]と区別するような意味を持たない時は省略して[['''構いません''']]。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
* 語彙
** 2文字ラテン文字
[130] 2文字の[[ラテン文字]]の[[地域]][[部分タグ]]は、
[REFS[
- [131] [[ISO 3166-1]] [CITE@en[Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes]]
]REFS]
... で定義された、またはそれにより登録された2文字の[[国符号]]を更に
[[IANA]] に登録したものです。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
*** 例外的予約国符号
[279] >>131 で「[RUBYB[例外的の予約]@en[exceptionally reserved]]」された
2文字の[[国符号]]についても、 [[RFC 4646]] には含まれていませんでしたが、
[[RFC 5646]] においては [[IANA]] に登録され、利用できることとされています。
[SRC[[[RFC 5646]] 2.2.4.]]
**** [CODE(lang)@en[UK]]
[280] ただし、 [CODE(lang)[[[GB]]]] と同義の [CODE(lang)[[[UK]]]]
は除外されています [SRC[[[RFC 5646]] 2.2.4.]]。
[291] [[Unicode地域符号]]としては、 [CODE(lang)@en[[[UK]]]] も認められています。
ただし、やはり [CODE(lang)@en[[[GB]]]] が[[正規形]]とされています。 [SRC[>>278]]
*** 私用
[281] [[私用]]の [CODE(lang)[[[AA]]]],
[CODE(lang)[[[QM]]]] ... [CODE(lang)[[[QZ]]]],
[CODE(lang)[[[XA]]]] ... [CODE(lang)[[[XZ]]]],
[CODE(lang)[[[ZZ]]]] も [[IANA]] に登録されており、利用することができます
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]。
[282] [[Unicode言語識別子]]、[[Unicodeロケール識別子]]では、そのうち特に
[CODE(lang)[[[XA]]]] .... [CODE(lang)[[[XZ]]]] を[[応用]]が使っても良いと定めています。
[SRC[>>278]]
;; [283] 逆にそれ以外の[[私用]]の[[Unicode領土符号]]は特別な意味を割り当てるために予約されているということです。
**** [CODE(lang)[QO]]
[284] [[Unicode言語識別子]]、[[Unicodeロケール識別子]]では
[DFN[[CODE(lang)[[[QO]]]]]] は [[Outlying Oceania]] を表します [SRC[>>278]]。
**** [CODE(lang)[QU]]
[285] [[Unicode言語識別子]]、[[Unicodeロケール識別子]]では
[DFN[[CODE(lang)[[[QU]]]]]] は[RUBYB[[[欧州連合]]]@en[European Union]]を表します [SRC[>>278]]。
[286] しかし [CODE(lang)[[[EU]]]] を用いるのが[RUBYB[好ましい]@en[preferred]]とされています [SRC[>>278]]。
;; [287] [CODE(lang)[[[EU]]]] が割り当てられる前にこちらの意味が定義されたようです。
**** [CODE(lang)[ZZ]]
[288] [[Unicode言語識別子]]、[[Unicodeロケール識別子]]では
[DFN[[CODE(lang)[[[ZZ]]]]]] は[RUBYB[未知・非妥当な領土]@en[Unknown or Invalid Territory]]を表します [SRC[>>278]]。
** 3文字数字
[132] 3文字の[[数字]]の[[地域]][[部分タグ]]は、
[REFS[
- [133] [[UN M.49]] [CITE@en[UN Standard Country or Area Codes for Statistical Use]]
]REFS]
... により定義、または登録されたものを更に [[IANA]]
に登録したものです。ただしこれには例外が多くあります。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
[FIG[
- [134] [[大陸]] (macro-geographical (continental)) やその一部の数値符号は登録しなければ[['''なりません''']]。 [SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
- [135] 経済グループ (economic groupings) やその他のグループ (other groupings) の数値符号は登録しては[['''なりません''']]。 [SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
- [136] [[ISO 3166-1]] が以前別の地域に割り当てていた国符号を別の地域に再割当し、 [[IANA]] 登録簿上で衝突が発生するときには、かわりにこちらの数値符号を登録しなければ[['''なりません''']]。 [SRC[[[RFC 5646]] 2.2.4.]] [WEAK[([[RFC 4646]] 2.2.4. にも類似した規定がありますが、曖昧で意味がよくわかりませんでした。)]]
- [137] [[ISO 3166-1]] に対応する[[国符号]]が存在する数値符号は登録しては[['''なりません''']]。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
-- [138] これ、 >>136 の場合を除き、ということでいいんですよね・・・。
- [140] [CODE(lang)[[['''830''']]]] ([[チャネル諸島]]) は [[IANA]]
に登録してもよいとされています。 [SRC[[[RFC 5646]] 2.2.4.]]
-- [141] [[RFC 4646]] 時代には [[RFC 4645]] (>>139) の 4. に示された4つの地域を
[[IANA]] に登録しても良いとされていましたが、 [[RFC 4645]]
自体がそのうちの3つは出版の数ヶ月前に [[ISO 3166-1]]
対応する[[国名符号]]が割り当てられているため不適格となった、と述べています。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 4545]] 4.]]
-- [142] [[チャネル諸島]]が [[IANA]] に登録されていないのは、
[[ISO 3166-1]] にいずれ登録されることを期待して、ということでしょうか・・・。
- [143] その他の数値符号は [[IANA]] に登録しては[['''なりません''']]。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
- [144] 附属書 X の英数字符号は [[ISO 3166-1]] の[[符号]]と同じものであり、
登録しては[['''なりません''']]。
[SRC[[[RFC 4646]] 2.2.4., [[RFC 5646]] 2.2.4.]]
]FIG]
[292] [[Unicode地域符号]]としては、 [DFN[[CODE[[[001]]]]]] ([[世界]]) は[RUBYB[標準形]@en[standard form]]を表すとされています。
[SRC[>>278]]
[EG[
[293] 例えば [CODE(lang)@en[[[ar-001]]]] は現代標準アラビア語を表します [SRC[>>278]]。
]EG]
* 歴史
[262] [[RFC 3066]] では2文字[[国符号]]と、3文字から8文字の[[部分タグ]]が2番目の[[部分タグ]]として認められていました。
3文字から8文字の[[部分タグ]]は [[IANA]] に登録することができるものとされていました。
1文字の[[部分タグ]]は将来の拡張のために予約されていました。
[SRC[[[RFC 3066]] 2.2]]
;; [263] 当時は[[用字形]][[部分タグ]]はなく、また[[私用]]は1番目の[[部分タグ]]に
[CODE(lang)[[[x]]]] を使うことによってのみ表せました。
[290] [[RFC 1766]] では2番目以降の[[部分タグ]]として任意の値を登録できるとされていました
[SRC[[[RFC 1766]] 2.]]。
[271] [[RFC 1766]] と [[RFC 3066]] は [[ISO 3166]] における[[私用]]の[[国符号]]
(>>130) に言及していました
[SRC[[[RFC 1766]] 2., [[RFC 3066]] 2.2.]]。 [[RFC 1766]] では単に [[ISO]]
で予約されているとしているだけでしたが、 [[RFC 3066]] では使っては[['''ならない''']]とされていました。
[[RFC 4646]] 以降は使って良いとされています。
* 関連
[289] [CITE@en-us[UTS #35: Unicode Locale Data Markup Language]] ([TIME[2011-07-19 03:14:51 +09:00]] 版) <http://unicode.org/reports/tr35/#Numeric_Codes>
では[[私用]]の2文字[[国符号]]、3文字[[国符号]]、3文字数値符号の対応関係が規定されています。
[294] [CITE@en[ISO 3166-1 alpha-2 - Wikipedia, the free encyclopedia]]
( ([TIME[2014-07-22 05:08:26 +09:00]] 版))
<http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>
[295] [CITE@en[RFC 5854 - The Metalink Download Description Format]]
( ([TIME[2014-09-14 16:54:14 +09:00]] 版))
<http://tools.ietf.org/html/rfc5854#section-4.2.16.2>
[2] [CITE[OASIS Open Document Format for Office Applications (OpenDocument) Version 1.2 - Part 1: OpenDocument Schema]]
([TIME[2011-09-29 13:00:00 +09:00]] 版)
<http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#a18_3_11countryCode>
[4] [[BR]] に従う[[証明書]]では、[[国]]の指定として適切な[[国]]符号が割り当てられていない時
[CODE[[[XX]]]] を使います [SRC[>>3]]。
[REFS[
- [3] [CITE[[[BR]]]] ([TIME[2014-11-01 05:54:38 +09:00]] 版) <https://cabforum.org/wp-content/uploads/BRv1.2.3.pdf#page=19>
]REFS]