aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-04-24 00:09:05 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-04-24 00:09:05 +0200
commit3b797a5f3ce1d77fa7d0ed991b52553c1b3e8757 (patch)
treee608ecc5b689afaebe1ac3ce112cb2a04e597448 /lib/unicode/prop
parent9cc2a0368fb0a3aa8b878d1795ed76734beadc02 (diff)
Properly upper- and titlecase ‘i’ and ‘j’ in Lithuanian
Diffstat (limited to 'lib/unicode/prop')
-rw-r--r--lib/unicode/prop/uprop_get_tc.c4
-rw-r--r--lib/unicode/prop/uprop_get_uc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/unicode/prop/uprop_get_tc.c b/lib/unicode/prop/uprop_get_tc.c
index 442db6e..83649e1 100644
--- a/lib/unicode/prop/uprop_get_tc.c
+++ b/lib/unicode/prop/uprop_get_tc.c
@@ -64,9 +64,11 @@ _MLIB_DEFINE_BSEARCH_KV(struct rview, lookup, M(ch))
struct rview
uprop_get_tc(rune ch, struct tcctx ctx)
{
+ constexpr rune COMB_DOT_ABOVE = 0x307;
+
if (ch == 'i' && ctx.az_or_tr)
return M(U'İ');
- if (ch == 0x307 && ctx.lt && ctx.after_i)
+ if (ch == COMB_DOT_ABOVE && ctx.lt && ctx.after_soft_dotted)
return M();
rune CH = uprop_get_stc(ch);
diff --git a/lib/unicode/prop/uprop_get_uc.c b/lib/unicode/prop/uprop_get_uc.c
index ecb0883..4563921 100644
--- a/lib/unicode/prop/uprop_get_uc.c
+++ b/lib/unicode/prop/uprop_get_uc.c
@@ -119,11 +119,13 @@ _MLIB_DEFINE_BSEARCH_KV(struct rview, lookup, M(ch))
struct rview
uprop_get_uc(rune ch, struct ucctx ctx)
{
+ constexpr rune COMB_DOT_ABOVE = 0x307;
+
if (ch == U'ß')
return ctx.ẞ ? M(U'ẞ') : M('S', 'S');
if (ch == 'i' && ctx.az_or_tr)
return M(U'İ');
- if (ch == 0x307 && ctx.lt && ctx.after_i)
+ if (ch == COMB_DOT_ABOVE && ctx.lt && ctx.after_soft_dotted)
return M();
rune CH = uprop_get_suc(ch);