From 66badb7449c2053c89456f11a7f71f3f5916b550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= Date: Thu, 5 Oct 2017 11:13:28 +0200 Subject: [PATCH] Extend dotless i and dotted I rules to Crimean Tatar language MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to support its special casing of ı/I, i/İ. (Use LANG crh in the affix file to use this feature.) --- src/hunspell/csutil.cxx | 5 +++-- src/hunspell/langnum.hxx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hunspell/csutil.cxx b/src/hunspell/csutil.cxx index df97b57..2980da7 100644 --- a/src/hunspell/csutil.cxx +++ b/src/hunspell/csutil.cxx @@ -2401,6 +2401,7 @@ static struct lang_map lang2enc[] = {{"ar", LANG_ar}, {"az", LANG_az}, {"az_AZ", LANG_az}, // for back-compatibility {"bg", LANG_bg}, {"ca", LANG_ca}, + {"crh", LANG_crh}, {"cs", LANG_cs}, {"da", LANG_da}, {"de", LANG_de}, {"el", LANG_el}, {"en", LANG_en}, {"es", LANG_es}, @@ -2458,7 +2459,7 @@ unsigned short unicodetoupper(unsigned short c, int langnum) { // In Azeri and Turkish, I and i dictinct letters: // There are a dotless lower case i pair of upper `I', // and an upper I with dot pair of lower `i'. - if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr))) + if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr) || (langnum == LANG_crh))) return 0x0130; #ifdef OPENOFFICEORG return static_cast(u_toupper(c)); @@ -2475,7 +2476,7 @@ unsigned short unicodetolower(unsigned short c, int langnum) { // In Azeri and Turkish, I and i dictinct letters: // There are a dotless lower case i pair of upper `I', // and an upper I with dot pair of lower `i'. - if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr))) + if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr) || (langnum == LANG_crh))) return 0x0131; #ifdef OPENOFFICEORG return static_cast(u_tolower(c)); diff --git a/src/hunspell/langnum.hxx b/src/hunspell/langnum.hxx index a64d3d7..f09de40 100644 --- a/src/hunspell/langnum.hxx +++ b/src/hunspell/langnum.hxx @@ -48,6 +48,7 @@ enum { LANG_az = 100, // custom number LANG_bg = 41, LANG_ca = 37, + LANG_crh = 102, // custom number LANG_cs = 42, LANG_da = 45, LANG_de = 49, -- 1.9.1