aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_latin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcharconv_latin.c')
-rw-r--r--libcharconv_latin.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libcharconv_latin.c b/libcharconv_latin.c
index 360b3dd..047dee5 100644
--- a/libcharconv_latin.c
+++ b/libcharconv_latin.c
@@ -449,6 +449,17 @@ libcharconv_latin(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz
c = (uint_least32_t)"gaehrcsGAEHRCS"[c - UINT32_C(0x1FA60)];
goto conv;
+ } else if (UINT32_C(0x2400) <= c && c <= UINT32_C(0x2421)) {
+ /* control character representations */
+ cs = ((const char *[]){
+ "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
+ "BS", "HT", "LF", " VT", "FF", "CR", "SS", "SI",
+ "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB",
+ "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US",
+ "SP", "DEL"
+ })[c & 0xFF];
+ goto conv_str;
+
} else {
use_switch:
switch (c) {