From Jason Turner

[text.encoding]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpi4wxivvg/{from.md → to.md} +579 -0
tmp/tmpi4wxivvg/{from.md → to.md} RENAMED
@@ -0,0 +1,579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Text encodings identification <a id="text.encoding">[[text.encoding]]</a>
2
+
3
+ ### Header `<text_encoding>` synopsis <a id="text.encoding.syn">[[text.encoding.syn]]</a>
4
+
5
+ ``` cpp
6
+ namespace std {
7
+ struct text_encoding;
8
+
9
+ // [text.encoding.hash], hash support
10
+ template<class T> struct hash;
11
+ template<> struct hash<text_encoding>;
12
+ }
13
+ ```
14
+
15
+ ### Class `text_encoding` <a id="text.encoding.class">[[text.encoding.class]]</a>
16
+
17
+ #### Overview <a id="text.encoding.overview">[[text.encoding.overview]]</a>
18
+
19
+ The class `text_encoding` describes an interface for accessing the IANA
20
+ Character Sets registry.
21
+
22
+ ``` cpp
23
+ namespace std {
24
+ struct text_encoding {
25
+ static constexpr size_t max_name_length = 63;
26
+
27
+ // [text.encoding.id], enumeration text_encoding::id
28
+ enum class id : int_least32_t {
29
+ see below
30
+ };
31
+ using enum id;
32
+
33
+ constexpr text_encoding() = default;
34
+ constexpr explicit text_encoding(string_view enc) noexcept;
35
+ constexpr text_encoding(id i) noexcept;
36
+
37
+ constexpr id mib() const noexcept;
38
+ constexpr const char* name() const noexcept;
39
+
40
+ // [text.encoding.aliases], class text_encoding::aliases_view
41
+ struct aliases_view;
42
+ constexpr aliases_view aliases() const noexcept;
43
+
44
+ friend constexpr bool operator==(const text_encoding& a,
45
+ const text_encoding& b) noexcept;
46
+ friend constexpr bool operator==(const text_encoding& encoding, id i) noexcept;
47
+
48
+ static consteval text_encoding literal() noexcept;
49
+ static text_encoding environment();
50
+ template<id i> static bool environment_is();
51
+
52
+ private:
53
+ id mib_ = id::unknown; // exposition only
54
+ char name_[max_name_length + 1] = {0}; // exposition only
55
+ static constexpr bool comp-name(string_view a, string_view b); // exposition only
56
+ };
57
+ }
58
+ ```
59
+
60
+ Class `text_encoding` is a trivially copyable type
61
+ [[term.trivially.copyable.type]].
62
+
63
+ #### General <a id="text.encoding.general">[[text.encoding.general]]</a>
64
+
65
+ A *registered character encoding* is a character encoding scheme in the
66
+ IANA Character Sets registry.
67
+
68
+ [*Note 1*: The IANA Character Sets registry uses the term “character
69
+ sets” to refer to character encodings. — *end note*]
70
+
71
+ The primary name of a registered character encoding is the name of that
72
+ encoding specified in the IANA Character Sets registry.
73
+
74
+ The set of known registered character encodings contains every
75
+ registered character encoding specified in the IANA Character Sets
76
+ registry except for the following:
77
+
78
+ - NATS-DANO (33)
79
+ - NATS-DANO-ADD (34)
80
+
81
+ Each known registered character encoding is identified by an enumerator
82
+ in `text_encoding::id`, and has a set of zero or more *aliases*.
83
+
84
+ The set of aliases of a known registered character encoding is an
85
+ *implementation-defined* superset of the aliases specified in the IANA
86
+ Character Sets registry. The set of aliases for US-ASCII includes
87
+ “ASCII”. No two aliases or primary names of distinct registered
88
+ character encodings are equivalent when compared by
89
+ `text_encoding::comp-name`.
90
+
91
+ How a `text_encoding` object is determined to be representative of a
92
+ character encoding scheme implemented in the translation or execution
93
+ environment is *implementation-defined*.
94
+
95
+ An object `e` of type `text_encoding` such that
96
+ `e.mib() == text_encoding::id::unknown` is `false` and
97
+ `e.mib() == text_encoding::id::other` is `false` maintains the following
98
+ invariants:
99
+
100
+ - `*e.name() == '\0'` is `false`, and
101
+ - `e.mib() == text_encoding(e.name()).mib()` is `true`.
102
+
103
+ *Recommended practice:*
104
+
105
+ - Implementations should not consider registered encodings to be
106
+ interchangeable. \[*Example 1*: Shift_JIS and Windows-31J denote
107
+ different encodings. — *end example*]
108
+ - Implementations should not use the name of a registered encoding to
109
+ describe another similar yet different non-registered encoding unless
110
+ there is a precedent on that implementation.
111
+ \[*Example 2*: Big5 — *end example*]
112
+
113
+ #### Members <a id="text.encoding.members">[[text.encoding.members]]</a>
114
+
115
+ ``` cpp
116
+ constexpr explicit text_encoding(string_view enc) noexcept;
117
+ ```
118
+
119
+ *Preconditions:*
120
+
121
+ - `enc` represents a string in the ordinary literal encoding consisting
122
+ only of elements of the basic character set [[lex.charset]].
123
+ - `enc.size() <= max_name_length` is `true`.
124
+ - `enc.contains(’\0’)` is `false`.
125
+
126
+ *Ensures:*
127
+
128
+ - If there exists a primary name or alias `a` of a known registered
129
+ character encoding such that *`comp-name`*`(a, enc)` is `true`,
130
+ *mib\_* has the value of the enumerator of `id` associated with that
131
+ registered character encoding. Otherwise, *`mib_`*` == id::other` is
132
+ `true`.
133
+ - `enc.compare(`*`name_`*`) == 0` is `true`.
134
+
135
+ ``` cpp
136
+ constexpr text_encoding(id i) noexcept;
137
+ ```
138
+
139
+ *Preconditions:* `i` has the value of one of the enumerators of `id`.
140
+
141
+ *Ensures:*
142
+
143
+ - *`mib_`*` == i` is `true`.
144
+ - If `(`*`mib_`*` == id::unknown || `*`mib_`*` == id::other)` is `true`,
145
+ `strlen(`*`name_`*`) == 0` is `true`. Otherwise,
146
+ `ranges::contains(aliases(), string_view(`*`name_`*`))` is `true`.
147
+
148
+ ``` cpp
149
+ constexpr id mib() const noexcept;
150
+ ```
151
+
152
+ *Returns:* *mib\_*.
153
+
154
+ ``` cpp
155
+ constexpr const char* name() const noexcept;
156
+ ```
157
+
158
+ *Returns:* *name\_*.
159
+
160
+ *Remarks:* `name()` is an NTBS and accessing elements of *name\_*
161
+ outside of the range `name()`+\[0, `strlen(name()) + 1`) is undefined
162
+ behavior.
163
+
164
+ ``` cpp
165
+ constexpr aliases_view aliases() const noexcept;
166
+ ```
167
+
168
+ Let `r` denote an instance of `aliases_view`. If `*this` represents a
169
+ known registered character encoding, then:
170
+
171
+ - `r.front()` is the primary name of the registered character encoding,
172
+ - `r` contains the aliases of the registered character encoding, and
173
+ - `r` does not contain duplicate values when compared with `strcmp`.
174
+
175
+ Otherwise, `r` is an empty range.
176
+
177
+ Each element in `r` is a non-null, non-empty NTBS encoded in the literal
178
+ character encoding and comprising only characters from the basic
179
+ character set.
180
+
181
+ *Returns:* `r`.
182
+
183
+ [*Note 1*: The order of aliases in `r` is unspecified. — *end note*]
184
+
185
+ ``` cpp
186
+ static consteval text_encoding literal() noexcept;
187
+ ```
188
+
189
+ *Mandates:* `CHAR_BIT == 8` is `true`.
190
+
191
+ *Returns:* A `text_encoding` object representing the ordinary character
192
+ literal encoding [[lex.charset]].
193
+
194
+ ``` cpp
195
+ static text_encoding environment();
196
+ ```
197
+
198
+ *Mandates:* `CHAR_BIT == 8` is `true`.
199
+
200
+ *Returns:* A `text_encoding` object representing the
201
+ *implementation-defined* character encoding scheme of the environment.
202
+ On a POSIX implementation, this is the encoding scheme associated with
203
+ the POSIX locale denoted by the empty string `""`.
204
+
205
+ [*Note 2*: This function is not affected by calls to
206
+ `setlocale`. — *end note*]
207
+
208
+ *Recommended practice:* Implementations should return a value that is
209
+ not affected by calls to the POSIX function `setenv` and other functions
210
+ which can modify the environment [[support.runtime]].
211
+
212
+ ``` cpp
213
+ template<id i>
214
+ static bool environment_is();
215
+ ```
216
+
217
+ *Mandates:* `CHAR_BIT == 8` is `true`.
218
+
219
+ *Returns:* `environment() == i`.
220
+
221
+ ``` cpp
222
+ static constexpr bool comp-name(string_view a, string_view b);
223
+ ```
224
+
225
+ *Returns:* `true` if the two strings `a` and `b` encoded in the ordinary
226
+ literal encoding are equal, ignoring, from left-to-right,
227
+
228
+ - all elements that are not digits or letters [[character.seq.general]],
229
+ - character case, and
230
+ - any sequence of one or more `0` characters not immediately preceded by
231
+ a numeric prefix, where a numeric prefix is a sequence consisting of a
232
+ digit in the range \[`1`, `9`\] optionally followed by one or more
233
+ elements which are not digits or letters,
234
+
235
+ and `false` otherwise.
236
+
237
+ [*Note 3*: This comparison is identical to the “Charset Alias Matching”
238
+ algorithm described in the Unicode Technical Standard 22. — *end note*]
239
+
240
+ [*Example 1*:
241
+
242
+ ``` cpp
243
+ static_assert(comp-name("UTF-8", "utf8") == true);
244
+ static_assert(comp-name("u.t.f-008", "utf8") == true);
245
+ static_assert(comp-name("ut8", "utf8") == false);
246
+ static_assert(comp-name("utf-80", "utf8") == false);
247
+ ```
248
+
249
+ — *end example*]
250
+
251
+ #### Comparison functions <a id="text.encoding.cmp">[[text.encoding.cmp]]</a>
252
+
253
+ ``` cpp
254
+ friend constexpr bool operator==(const text_encoding& a, const text_encoding& b) noexcept;
255
+ ```
256
+
257
+ *Returns:* If `a.`*`mib_`*` == id::other && b.`*`mib_`*` == id::other`
258
+ is `true`, then *`comp-name`*`(a.`*`name_`*`,b.`*`name_`*`)`. Otherwise,
259
+ `a.`*`mib_`*` == b.`*`mib_`*.
260
+
261
+ ``` cpp
262
+ friend constexpr bool operator==(const text_encoding& encoding, id i) noexcept;
263
+ ```
264
+
265
+ *Returns:* `encoding.`*`mib_`*` == i`.
266
+
267
+ *Remarks:* This operator induces an equivalence relation on its
268
+ arguments if and only if `i != id::other` is `true`.
269
+
270
+ #### Class `text_encoding::aliases_view` <a id="text.encoding.aliases">[[text.encoding.aliases]]</a>
271
+
272
+ ``` cpp
273
+ struct text_encoding::aliases_view : ranges::view_interface<text_encoding::aliases_view> {
274
+ constexpr implementation-defined // type of text_encoding::aliases_view::begin() begin() const;
275
+ constexpr implementation-defined // type of text_encoding::aliases_view::end() end() const;
276
+ };
277
+ ```
278
+
279
+ `text_encoding::aliases_view` models `copyable`, `ranges::view`,
280
+ `ranges::random_access_range`, and `ranges::borrowed_range`.
281
+
282
+ [*Note 1*: `text_encoding::aliases_view` is not required to satisfy
283
+ `ranges::``common_range`, nor `default_initializable`. — *end note*]
284
+
285
+ Both `ranges::range_value_t<text_encoding::aliases_view>` and
286
+ `ranges::range_reference_t<text_encoding::aliases_view>` denote
287
+ `const char*`.
288
+
289
+ `ranges::iterator_t<text_encoding::aliases_view>` is a constexpr
290
+ iterator [[iterator.requirements.general]].
291
+
292
+ #### Enumeration `text_encoding::id` <a id="text.encoding.id">[[text.encoding.id]]</a>
293
+
294
+ ``` cpp
295
+ namespace std {
296
+ enum class text_encoding::id : int_least32_t {
297
+ other = 1,
298
+ unknown = 2,
299
+ ASCII = 3,
300
+ ISOLatin1 = 4,
301
+ ISOLatin2 = 5,
302
+ ISOLatin3 = 6,
303
+ ISOLatin4 = 7,
304
+ ISOLatinCyrillic = 8,
305
+ ISOLatinArabic = 9,
306
+ ISOLatinGreek = 10,
307
+ ISOLatinHebrew = 11,
308
+ ISOLatin5 = 12,
309
+ ISOLatin6 = 13,
310
+ ISOTextComm = 14,
311
+ HalfWidthKatakana = 15,
312
+ JISEncoding = 16,
313
+ ShiftJIS = 17,
314
+ EUCPkdFmtJapanese = 18,
315
+ EUCFixWidJapanese = 19,
316
+ ISO4UnitedKingdom = 20,
317
+ ISO11SwedishForNames = 21,
318
+ ISO15Italian = 22,
319
+ ISO17Spanish = 23,
320
+ ISO21German = 24,
321
+ ISO60DanishNorwegian = 25,
322
+ ISO69French = 26,
323
+ ISO10646UTF1 = 27,
324
+ ISO646basic1983 = 28,
325
+ INVARIANT = 29,
326
+ ISO2IntlRefVersion = 30,
327
+ NATSSEFI = 31,
328
+ NATSSEFIADD = 32,
329
+ ISO10Swedish = 35,
330
+ KSC56011987 = 36,
331
+ ISO2022KR = 37,
332
+ EUCKR = 38,
333
+ ISO2022JP = 39,
334
+ ISO2022JP2 = 40,
335
+ ISO13JISC6220jp = 41,
336
+ ISO14JISC6220ro = 42,
337
+ ISO16Portuguese = 43,
338
+ ISO18Greek7Old = 44,
339
+ ISO19LatinGreek = 45,
340
+ ISO25French = 46,
341
+ ISO27LatinGreek1 = 47,
342
+ ISO5427Cyrillic = 48,
343
+ ISO42JISC62261978 = 49,
344
+ ISO47BSViewdata = 50,
345
+ ISO49INIS = 51,
346
+ ISO50INIS8 = 52,
347
+ ISO51INISCyrillic = 53,
348
+ ISO54271981 = 54,
349
+ ISO5428Greek = 55,
350
+ ISO57GB1988 = 56,
351
+ ISO58GB231280 = 57,
352
+ ISO61Norwegian2 = 58,
353
+ ISO70VideotexSupp1 = 59,
354
+ ISO84Portuguese2 = 60,
355
+ ISO85Spanish2 = 61,
356
+ ISO86Hungarian = 62,
357
+ ISO87JISX0208 = 63,
358
+ ISO88Greek7 = 64,
359
+ ISO89ASMO449 = 65,
360
+ ISO90 = 66,
361
+ ISO91JISC62291984a = 67,
362
+ ISO92JISC62991984b = 68,
363
+ ISO93JIS62291984badd = 69,
364
+ ISO94JIS62291984hand = 70,
365
+ ISO95JIS62291984handadd = 71,
366
+ ISO96JISC62291984kana = 72,
367
+ ISO2033 = 73,
368
+ ISO99NAPLPS = 74,
369
+ ISO102T617bit = 75,
370
+ ISO103T618bit = 76,
371
+ ISO111ECMACyrillic = 77,
372
+ ISO121Canadian1 = 78,
373
+ ISO122Canadian2 = 79,
374
+ ISO123CSAZ24341985gr = 80,
375
+ ISO88596E = 81,
376
+ ISO88596I = 82,
377
+ ISO128T101G2 = 83,
378
+ ISO88598E = 84,
379
+ ISO88598I = 85,
380
+ ISO139CSN369103 = 86,
381
+ ISO141JUSIB1002 = 87,
382
+ ISO143IECP271 = 88,
383
+ ISO146Serbian = 89,
384
+ ISO147Macedonian = 90,
385
+ ISO150 = 91,
386
+ ISO151Cuba = 92,
387
+ ISO6937Add = 93,
388
+ ISO153GOST1976874 = 94,
389
+ ISO8859Supp = 95,
390
+ ISO10367Box = 96,
391
+ ISO158Lap = 97,
392
+ ISO159JISX02121990 = 98,
393
+ ISO646Danish = 99,
394
+ USDK = 100,
395
+ DKUS = 101,
396
+ KSC5636 = 102,
397
+ Unicode11UTF7 = 103,
398
+ ISO2022CN = 104,
399
+ ISO2022CNEXT = 105,
400
+ UTF8 = 106,
401
+ ISO885913 = 109,
402
+ ISO885914 = 110,
403
+ ISO885915 = 111,
404
+ ISO885916 = 112,
405
+ GBK = 113,
406
+ GB18030 = 114,
407
+ OSDEBCDICDF0415 = 115,
408
+ OSDEBCDICDF03IRV = 116,
409
+ OSDEBCDICDF041 = 117,
410
+ ISO115481 = 118,
411
+ KZ1048 = 119,
412
+ UCS2 = 1000,
413
+ UCS4 = 1001,
414
+ UnicodeASCII = 1002,
415
+ UnicodeLatin1 = 1003,
416
+ UnicodeJapanese = 1004,
417
+ UnicodeIBM1261 = 1005,
418
+ UnicodeIBM1268 = 1006,
419
+ UnicodeIBM1276 = 1007,
420
+ UnicodeIBM1264 = 1008,
421
+ UnicodeIBM1265 = 1009,
422
+ Unicode11 = 1010,
423
+ SCSU = 1011,
424
+ UTF7 = 1012,
425
+ UTF16BE = 1013,
426
+ UTF16LE = 1014,
427
+ UTF16 = 1015,
428
+ CESU8 = 1016,
429
+ UTF32 = 1017,
430
+ UTF32BE = 1018,
431
+ UTF32LE = 1019,
432
+ BOCU1 = 1020,
433
+ UTF7IMAP = 1021,
434
+ Windows30Latin1 = 2000,
435
+ Windows31Latin1 = 2001,
436
+ Windows31Latin2 = 2002,
437
+ Windows31Latin5 = 2003,
438
+ HPRoman8 = 2004,
439
+ AdobeStandardEncoding = 2005,
440
+ VenturaUS = 2006,
441
+ VenturaInternational = 2007,
442
+ DECMCS = 2008,
443
+ PC850Multilingual = 2009,
444
+ PCp852 = 2010,
445
+ PC8CodePage437 = 2011,
446
+ PC8DanishNorwegian = 2012,
447
+ PC862LatinHebrew = 2013,
448
+ PC8Turkish = 2014,
449
+ IBMSymbols = 2015,
450
+ IBMThai = 2016,
451
+ HPLegal = 2017,
452
+ HPPiFont = 2018,
453
+ HPMath8 = 2019,
454
+ HPPSMath = 2020,
455
+ HPDesktop = 2021,
456
+ VenturaMath = 2022,
457
+ MicrosoftPublishing = 2023,
458
+ Windows31J = 2024,
459
+ GB2312 = 2025,
460
+ Big5 = 2026,
461
+ Macintosh = 2027,
462
+ IBM037 = 2028,
463
+ IBM038 = 2029,
464
+ IBM273 = 2030,
465
+ IBM274 = 2031,
466
+ IBM275 = 2032,
467
+ IBM277 = 2033,
468
+ IBM278 = 2034,
469
+ IBM280 = 2035,
470
+ IBM281 = 2036,
471
+ IBM284 = 2037,
472
+ IBM285 = 2038,
473
+ IBM290 = 2039,
474
+ IBM297 = 2040,
475
+ IBM420 = 2041,
476
+ IBM423 = 2042,
477
+ IBM424 = 2043,
478
+ IBM500 = 2044,
479
+ IBM851 = 2045,
480
+ IBM855 = 2046,
481
+ IBM857 = 2047,
482
+ IBM860 = 2048,
483
+ IBM861 = 2049,
484
+ IBM863 = 2050,
485
+ IBM864 = 2051,
486
+ IBM865 = 2052,
487
+ IBM868 = 2053,
488
+ IBM869 = 2054,
489
+ IBM870 = 2055,
490
+ IBM871 = 2056,
491
+ IBM880 = 2057,
492
+ IBM891 = 2058,
493
+ IBM903 = 2059,
494
+ IBM904 = 2060,
495
+ IBM905 = 2061,
496
+ IBM918 = 2062,
497
+ IBM1026 = 2063,
498
+ IBMEBCDICATDE = 2064,
499
+ EBCDICATDEA = 2065,
500
+ EBCDICCAFR = 2066,
501
+ EBCDICDKNO = 2067,
502
+ EBCDICDKNOA = 2068,
503
+ EBCDICFISE = 2069,
504
+ EBCDICFISEA = 2070,
505
+ EBCDICFR = 2071,
506
+ EBCDICIT = 2072,
507
+ EBCDICPT = 2073,
508
+ EBCDICES = 2074,
509
+ EBCDICESA = 2075,
510
+ EBCDICESS = 2076,
511
+ EBCDICUK = 2077,
512
+ EBCDICUS = 2078,
513
+ Unknown8BiT = 2079,
514
+ Mnemonic = 2080,
515
+ Mnem = 2081,
516
+ VISCII = 2082,
517
+ VIQR = 2083,
518
+ KOI8R = 2084,
519
+ HZGB2312 = 2085,
520
+ IBM866 = 2086,
521
+ PC775Baltic = 2087,
522
+ KOI8U = 2088,
523
+ IBM00858 = 2089,
524
+ IBM00924 = 2090,
525
+ IBM01140 = 2091,
526
+ IBM01141 = 2092,
527
+ IBM01142 = 2093,
528
+ IBM01143 = 2094,
529
+ IBM01144 = 2095,
530
+ IBM01145 = 2096,
531
+ IBM01146 = 2097,
532
+ IBM01147 = 2098,
533
+ IBM01148 = 2099,
534
+ IBM01149 = 2100,
535
+ Big5HKSCS = 2101,
536
+ IBM1047 = 2102,
537
+ PTCP154 = 2103,
538
+ Amiga1251 = 2104,
539
+ KOI7switched = 2105,
540
+ BRF = 2106,
541
+ TSCII = 2107,
542
+ CP51932 = 2108,
543
+ windows874 = 2109,
544
+ windows1250 = 2250,
545
+ windows1251 = 2251,
546
+ windows1252 = 2252,
547
+ windows1253 = 2253,
548
+ windows1254 = 2254,
549
+ windows1255 = 2255,
550
+ windows1256 = 2256,
551
+ windows1257 = 2257,
552
+ windows1258 = 2258,
553
+ TIS620 = 2259,
554
+ CP50220 = 2260
555
+ };
556
+ }
557
+ ```
558
+
559
+ [*Note 1*:
560
+
561
+ The `text_encoding::id` enumeration contains an enumerator for each
562
+ known registered character encoding. For each encoding, the
563
+ corresponding enumerator is derived from the alias beginning with
564
+ “`cs`”, as follows
565
+
566
+ - `csUnicode` is mapped to `text_encoding::id::UCS2`,
567
+ - `csIBBM904` is mapped to `text_encoding::id::IBM904`, and
568
+ - the “`cs`” prefix is removed from other names.
569
+
570
+ — *end note*]
571
+
572
+ #### Hash support <a id="text.encoding.hash">[[text.encoding.hash]]</a>
573
+
574
+ ``` cpp
575
+ template<> struct hash<text_encoding>;
576
+ ```
577
+
578
+ The specialization is enabled [[unord.hash]].
579
+