tmp/tmprw81ha1h/{from.md → to.md}
RENAMED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
### Requirements <a id="depr.locale.stdcvt.req">[[depr.locale.stdcvt.req]]</a>
|
| 2 |
-
|
| 3 |
-
For each of the three code conversion facets `codecvt_utf8`,
|
| 4 |
-
`codecvt_utf16`, and `codecvt_utf8_utf16`:
|
| 5 |
-
|
| 6 |
-
- `Elem` is the wide-character type, such as `wchar_t`, `char16_t`, or
|
| 7 |
-
`char32_t`.
|
| 8 |
-
- `Maxcode` is the largest wide-character code that the facet will read
|
| 9 |
-
or write without reporting a conversion error.
|
| 10 |
-
- If `(Mode & consume_header)`, the facet shall consume an initial
|
| 11 |
-
header sequence, if present, when reading a multibyte sequence to
|
| 12 |
-
determine the endianness of the subsequent multibyte sequence to be
|
| 13 |
-
read.
|
| 14 |
-
- If `(Mode & generate_header)`, the facet shall generate an initial
|
| 15 |
-
header sequence when writing a multibyte sequence to advertise the
|
| 16 |
-
endianness of the subsequent multibyte sequence to be written.
|
| 17 |
-
- If `(Mode & little_endian)`, the facet shall generate a multibyte
|
| 18 |
-
sequence in little-endian order, as opposed to the default big-endian
|
| 19 |
-
order.
|
| 20 |
-
- UCS-2 is the same encoding as UTF-16, except that it encodes scalar
|
| 21 |
-
values in the range `U+0000`–`U+ffff` (Basic Multilingual Plane) only.
|
| 22 |
-
|
| 23 |
-
For the facet `codecvt_utf8`:
|
| 24 |
-
|
| 25 |
-
- The facet shall convert between UTF-8 multibyte sequences and UCS-2 or
|
| 26 |
-
UTF-32 (depending on the size of `Elem`).
|
| 27 |
-
- Endianness shall not affect how multibyte sequences are read or
|
| 28 |
-
written.
|
| 29 |
-
- The multibyte sequences may be written as either a text or a binary
|
| 30 |
-
file.
|
| 31 |
-
|
| 32 |
-
For the facet `codecvt_utf16`:
|
| 33 |
-
|
| 34 |
-
- The facet shall convert between UTF-16 multibyte sequences and UCS-2
|
| 35 |
-
or UTF-32 (depending on the size of `Elem`).
|
| 36 |
-
- Multibyte sequences shall be read or written according to the `Mode`
|
| 37 |
-
flag, as set out above.
|
| 38 |
-
- The multibyte sequences may be written only as a binary file.
|
| 39 |
-
Attempting to write to a text file produces undefined behavior.
|
| 40 |
-
|
| 41 |
-
For the facet `codecvt_utf8_utf16`:
|
| 42 |
-
|
| 43 |
-
- The facet shall convert between UTF-8 multibyte sequences and UTF-16
|
| 44 |
-
(one or two 16-bit codes) within the program.
|
| 45 |
-
- Endianness shall not affect how multibyte sequences are read or
|
| 46 |
-
written.
|
| 47 |
-
- The multibyte sequences may be written as either a text or a binary
|
| 48 |
-
file.
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|