-
Notifications
You must be signed in to change notification settings - Fork 4
/
934.txt
289 lines (210 loc) · 12.9 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
[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領土符号]]は特別な意味を割り当てるために予約されているということです。
[5] [CODE[XK]] は、[[コソボ]]を表すため用いられています。
**** [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]
* 文脈
[FIG(short list)[ [[ISO]] [[国符号]]の利用される場面
- [[言語タグ]] (2文字[[英字]])
- [CODE[$place]]
]FIG]
* 歴史
[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]
[FIG(quote)[
[FIGCAPTION[
[6] [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/#lang-cal-place>
]FIGCAPTION]
> The geographical area identified by a country code is defined by the boundaries as they existed at the time of the date to be formatted, or the present-day boundaries for dates in the future.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[7] [CITE[Top-level Element: <originInfo> (MODS Ver. 3 User Guidelines: Metadata Object Description Schema, Library of Congress)]]
([TIME[2013-08-15 04:37:12 +09:00]])
<https://www.loc.gov/standards/mods/userguide/origininfo.html>
]FIGCAPTION]
> iso3166 – This source code is used with country codes from ISO 3166. See the ISO 3166 Code Lists for a listing of the codes.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[8] [CITE@en[RFC 7483 - JSON Responses for the Registration Data Access Protocol (RDAP)]]
([TIME[2017-05-07 17:28:01 +09:00]])
<https://tools.ietf.org/html/rfc7483#section-3>
]FIGCAPTION]
>
> country codes: Where the identity of a geopolitical nation or
> country is needed, these identities are represented
> with the alpha-2 or two-character country code
> designation as defined in '''['''ISO.3166.1988''']'''. The
> alpha-2 representation is used because it is freely
> available, whereas the alpha-3 and numeric-3
> standards are not.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[9] [CITE[JSON API Reference | Worldpay Developer]]
([TIME[2017-02-14 01:34:22 +09:00]])
<https://developer.worldpay.com/jsonapi/api#orders>
]FIGCAPTION]
> countryCode: String
> The ISO 3166 alpha-2 2-letter country code. ISO country codes are defined here.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[10] ([TIME[2004-09-21 00:09:43 +09:00]])
<https://www.cs.auckland.ac.nz/~pgut001/pubs/x509guide.txt>
]FIGCAPTION]
> Country codes in DNs created by MS software can contain values other than
> the allowed two-character ISO code (for example three-character country name
> abbreviations).
]FIG]
[FIG(quote)[
[FIGCAPTION[
[11] [CITE@en[RFC 5139 - Revised Civic Location Format for Presence Information Data Format Location Object (PIDF-LO)]]
([TIME[2018-02-11 18:30:45 +09:00]])
<https://tools.ietf.org/html/rfc5139#section-3.3>
]FIGCAPTION]
> The "country" element differs from that defined in '''['''RFC4119''']''' in that
> it now restricts the value space of the element to two uppercase
> characters, which correspond to the alpha-2 codes in '''['''ISO.3166-1''']'''.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[12] [CITE@en[RFC 4119 - A Presence-based GEOPRIV Location Object Format]]
([TIME[2018-02-11 21:10:31 +09:00]])
<https://tools.ietf.org/html/rfc4119>
]FIGCAPTION]
> | country | The country is | US |
> | | identified by the | |
> | | two-letter ISO 3166 | |
> | | code. | |
]FIG]
[13] [CITE@en[RFC 5774 - Considerations for Civic Addresses in PIDF-LO]]
([TIME[2018-02-11 19:30:46 +09:00]])
<https://tools.ietf.org/html/rfc5774#section-4.2.1>
[14] [CITE@ja[マップのローカライズ | Google Maps JavaScript API | Google Developers]]
([TIME[2017-08-18 09:12:07 +09:00]])
<https://developers.google.com/maps/documentation/javascript/localization?hl=ja>