aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-25 16:47:31 +0100
committerMattias Andrée <m@maandree.se>2026-01-25 16:47:31 +0100
commitbe31b5bf388a8b2b9bd602d24cc6cf2b0cd3e66d (patch)
tree33cbd70957d98c6aa0469d0a4dbd3b5bd7235d4a
parentAdd transposed (diff)
downloadcharconv-be31b5bf388a8b2b9bd602d24cc6cf2b0cd3e66d.tar.gz
charconv-be31b5bf388a8b2b9bd602d24cc6cf2b0cd3e66d.tar.bz2
charconv-be31b5bf388a8b2b9bd602d24cc6cf2b0cd3e66d.tar.xz
Add some symbol transformations
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libcharconv_flipped.c7
-rw-r--r--libcharconv_latin.c1
-rw-r--r--libcharconv_mirrored.c8
-rw-r--r--libcharconv_turned.c22
4 files changed, 35 insertions, 3 deletions
diff --git a/libcharconv_flipped.c b/libcharconv_flipped.c
index 952d7e6..be18209 100644
--- a/libcharconv_flipped.c
+++ b/libcharconv_flipped.c
@@ -6,7 +6,12 @@ static struct {
uint_least32_t a;
uint_least32_t b;
} pairs[] = {
- {0x00A1, 0x0021}
+ {0x00A1, 0x0021},
+ {UINT32_C(0xA4EF), (uint_least32_t)'A'},
+ {UINT32_C(0xA4D5), (uint_least32_t)'Y'}, /* the one in letterlike is sans-serif */
+ {UINT32_C(0xA4F5), (uint_least32_t)'U'},
+ {UINT32_C(0xA4E5), (uint_least32_t)'V'},
+ {UINT32_C(0x1D5B8), UINT32_C(0x2144)}
};
diff --git a/libcharconv_latin.c b/libcharconv_latin.c
index b1a2de2..e984f51 100644
--- a/libcharconv_latin.c
+++ b/libcharconv_latin.c
@@ -647,6 +647,7 @@ libcharconv_latin(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz
case UINT32_C(0x00A1): c = UINT32_C(0x0021); goto conv;
case UINT32_C(0x00BF): c = UINT32_C(0x003F); goto conv;
case UINT32_C(0x2E35): c = UINT32_C(0x003B); goto conv;
+ case UINT32_C(0x1F12F): c1 = '('; c2 = 'C'; c3 = ')'; goto conv3;
default:
no_match:
diff --git a/libcharconv_mirrored.c b/libcharconv_mirrored.c
index 75ae5cb..9f16569 100644
--- a/libcharconv_mirrored.c
+++ b/libcharconv_mirrored.c
@@ -11,7 +11,13 @@ static struct {
{0x2034, 0x2037},
{0x204F, 0x003B},
{0x2E2E, 0x003F},
- {0x2143, 0x004C}
+ {0x2143, 0x004C},
+ {UINT32_C(0xA4ED), (uint_least32_t)'B'},
+ {UINT32_C(0xA4DB), (uint_least32_t)'C'},
+ {UINT32_C(0xA4F7), (uint_least32_t)'D'},
+ {UINT32_C(0xA4F1), (uint_least32_t)'E'},
+ {UINT32_C(0xA4D8), (uint_least32_t)'K'},
+ {UINT32_C(0x1F12F), UINT32_C(0x00A9)}
};
diff --git a/libcharconv_turned.c b/libcharconv_turned.c
index 8436305..33b8a31 100644
--- a/libcharconv_turned.c
+++ b/libcharconv_turned.c
@@ -13,7 +13,27 @@ static struct {
{0x0021, 0x00A1},
{0x003F, 0x00BF},
{0x2E35, 0x003B},
- {0x203D, 0x2E18}
+ {0x203D, 0x2E18},
+ {UINT32_C(0xA4EF), (uint_least32_t)'A'},
+ {UINT32_C(0xA4ED), (uint_least32_t)'B'},
+ {UINT32_C(0xA4DB), (uint_least32_t)'C'},
+ {UINT32_C(0xA4F7), (uint_least32_t)'D'},
+ {UINT32_C(0xA4F1), (uint_least32_t)'E'},
+ {UINT32_C(0xA4DE), (uint_least32_t)'F'}, /* there is a letterlike alternative */
+ {UINT32_C(0x2132), (uint_least32_t)'F'}, /* secondary alternative */
+ {UINT32_C(0xA4E8), (uint_least32_t)'G'}, /* the one in letterlike is sans-serif */
+ {UINT32_C(0xA4E9), (uint_least32_t)'J'},
+ {UINT32_C(0xA4D8), (uint_least32_t)'K'},
+ {UINT32_C(0xA4F6), (uint_least32_t)'L'}, /* the one in letterlike is sans-serif */
+ {UINT32_C(0xA4D2), (uint_least32_t)'P'},
+ {UINT32_C(0xA4E4), (uint_least32_t)'R'},
+ {UINT32_C(0xA4D5), (uint_least32_t)'Y'}, /* the one in letterlike is sans-serif */
+ {UINT32_C(0xA4F5), (uint_least32_t)'U'},
+ {UINT32_C(0xA4E5), (uint_least32_t)'V'},
+ {UINT32_C(0x1D5A6), UINT32_C(0x2141)},
+ {UINT32_C(0x1D5AB), UINT32_C(0x2142)},
+ {UINT32_C(0x1D5B8), UINT32_C(0x2144)},
+ {UINT32_C(0x1F12F), UINT32_C(0x00A9)}
};