Universal Character Names in C Programming

0
Universal character names (UCNs) in C programming allow the representation of characters that are not part of the basic character set. They can be used in identifiers, character constants, and string literals.

A universal character name is represented as follows:

\u hex-quad
\U hex-quad hex-quad

Here, a `hex-quad` is a sequence of four hexadecimal digits:

hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit

A universal character name should not specify a character whose short identifier is less than 00A0, other than 0024 ($), 0040 (@), or 0060 (`), nor one in the range D800 through DFFF inclusive.

Universal character names provide a way to represent characters that are not part of the basic character set in identifiers, character constants, and string literals.

The universal character name `\Unnnnnnnn` designates the character whose eight-digit short identifier (as specified by ISO/IEC 10646) is `nnnnnnnn`. Similarly, the universal character name `\unnnn` designates the character whose four-digit short identifier is `nnnn` (and whose eight-digit short identifier is `0000nnnn`).
Tags

Post a Comment

0Comments
Post a Comment (0)