CHARENCODING
— Show UTF-16 and UTF-8
encodings for characters.
Syntax:
CHARENCODING
/16 /8 /C /D /K /X
value "
string"
…
/16 | show UTF-16 encoding |
/8 | show UTF-8 encoding |
/C | show characters |
/D | show decimal values |
/K | show character class |
/X | expand C-style character escapes in quoted strings |
value | hex character value; leading 0x or U+ is optional |
" string" | strign literal between quotes |
You may enter characters as quoted string literals, character values,
HTML 4 character entities,
or any combination. You may prefix hex values with 0x
or U+
but neither is required. With or without either prefix, hexadecimal is assumed. Separate
values with spaces. If you specify neither /16
nor /8
, the default
is to show both.
/K
displays a one-letter code
to indicate the type of character:
K | Class |
---|---|
A | alphabetic |
D | digit |
P | punctuation |
W | whitespace |
C | control character |
B | Byte Order Mark |
N | noncharacter |
H | unpaired surrogate (high) — not a character |
L | unpaired surrogate (low) — not a character |
- | anything else |
/X
expands any escapes
in quoted strings after the /X
on the command line. Strings
before the /X
will not be expanded.
charencoding /c "Hello, world. %@smiley[56]"