|
346 | 346 | to a wide character or string literal. |
347 | 347 |
|
348 | 348 | \pnum |
349 | | -A literal encoding or a locale-specific encoding of one of |
350 | | -the execution character sets\iref{character.seq} |
351 | | -encodes each element of the basic literal character set as |
| 349 | +An encoding is \defnx{valid}{encoding!valid} if all of the following |
| 350 | +conditions are satisfied: |
| 351 | +\begin{itemize} |
| 352 | +\item |
| 353 | +Each element of the basic literal character set is encoded as |
352 | 354 | a single code unit with non-negative value, |
353 | 355 | distinct from the code unit for any other such element. |
354 | 356 | \begin{note} |
|
357 | 359 | the value of such a code unit can be the same as |
358 | 360 | that of a code unit for an element of the basic literal character set. |
359 | 361 | \end{note} |
| 362 | +\item |
360 | 363 | \indextext{character!null}% |
361 | 364 | \indextext{wide-character!null}% |
362 | | -The U+0000 NULL character is encoded as the value \tcode{0}. |
363 | | -No other element of the translation character set |
| 365 | +The U+0000 NULL character is encoded as the value \tcode{0}; |
| 366 | +no other element of the translation character set |
364 | 367 | is encoded with a code unit of value \tcode{0}. |
| 368 | +\item |
365 | 369 | The code unit value of each decimal digit character after the digit \tcode{0} (U+0030) |
366 | | -shall be one greater than the value of the previous. |
367 | | -The ordinary and wide literal encodings are otherwise |
368 | | -\impldef{ordinary and wide literal encodings}. |
| 370 | +is one greater than the value of the previous. |
| 371 | +\end{itemize} |
| 372 | + |
| 373 | +\pnum |
| 374 | +The ordinary and wide literal encodings are valid encodings, |
| 375 | +but are otherwise \impldef{ordinary and wide literal encodings}. |
369 | 376 | \indextext{UTF-8}% |
370 | 377 | \indextext{UTF-16}% |
371 | 378 | \indextext{UTF-32}% |
372 | 379 | For a UTF-8, UTF-16, or UTF-32 literal, |
373 | 380 | the UCS scalar value |
374 | 381 | corresponding to each character of the translation character set |
375 | 382 | is encoded as specified in ISO/IEC 10646 for the respective UCS encoding form. |
| 383 | +\begin{note} |
| 384 | +Those encodings are also valid encodings. |
| 385 | +\end{note} |
376 | 386 | \indextext{character set|)} |
377 | 387 |
|
378 | 388 | \rSec1[lex.pptoken]{Preprocessing tokens} |
|
0 commit comments