aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/spellfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/spellfix.c')
-rw-r--r--ext/misc/spellfix.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/misc/spellfix.c b/ext/misc/spellfix.c
index 0515b7bc6..c0da6b339 100644
--- a/ext/misc/spellfix.c
+++ b/ext/misc/spellfix.c
@@ -1717,17 +1717,23 @@ static void scriptCodeSqlFunc(
# define SCRIPT_LATIN 0x0001
# define SCRIPT_CYRILLIC 0x0002
# define SCRIPT_GREEK 0x0004
+# define SCRIPT_HEBREW 0x0008
+# define SCRIPT_ARABIC 0x0010
while( nIn>0 ){
c = utf8Read(zIn, nIn, &sz);
zIn += sz;
nIn -= sz;
- if( c<0x02af ){
+ if( c<0x02af && (c>=0x80 || midClass[c&0x7f]<CCLASS_DIGIT) ){
scriptMask |= SCRIPT_LATIN;
}else if( c>=0x0400 && c<=0x04ff ){
scriptMask |= SCRIPT_CYRILLIC;
}else if( c>=0x0386 && c<=0x03ce ){
scriptMask |= SCRIPT_GREEK;
+ }else if( c>=0x0590 && c<=0x05ff ){
+ scriptMask |= SCRIPT_HEBREW;
+ }else if( c>=0x0600 && c<=0x06ff ){
+ scriptMask |= SCRIPT_ARABIC;
}
}
switch( scriptMask ){
@@ -1735,6 +1741,8 @@ static void scriptCodeSqlFunc(
case SCRIPT_LATIN: res = 215; break;
case SCRIPT_CYRILLIC: res = 220; break;
case SCRIPT_GREEK: res = 200; break;
+ case SCRIPT_HEBREW: res = 125; break;
+ case SCRIPT_ARABIC: res = 160; break;
default: res = 998; break;
}
sqlite3_result_int(context, res);