summaryrefslogtreecommitdiff
path: root/indexing/upmendex/source/sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'indexing/upmendex/source/sort.c')
-rw-r--r--indexing/upmendex/source/sort.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/indexing/upmendex/source/sort.c b/indexing/upmendex/source/sort.c
index 5d11a0727c..15272dc859 100644
--- a/indexing/upmendex/source/sort.c
+++ b/indexing/upmendex/source/sort.c
@@ -366,9 +366,18 @@ int is_numeric(UChar *c)
int is_jpn_kana(UChar *c)
{
+ UChar32 c32;
+
if ((*c>=0x3040)&&(*c<=0x30FF)) return 1; /* Hiragana, Katakana */
else if ((*c>=0x31F0)&&(*c<=0x31FF)) return 1; /* Katakana Phonetic Extensions */
- else return 0;
+
+ if (is_surrogate_pair(c)) {
+ c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
+ if ((c32>=0x1B130) && (c32<=0x1B16F)) return 2; /* Small Kana Extensions */
+ }
+ return 0;
+ /* ICU 65 does not seem to support
+ "Kana Supplement" and "Kana Extended-A" yet. (2020/02/16) */
}
int is_kor_hngl(UChar *c)
@@ -399,7 +408,8 @@ int is_hanzi(UChar *c)
if (is_surrogate_pair(c)) {
c32=U16_GET_SUPPLEMENTARY(*c,*(c+1));
if ((c32>=0x20000) && /* CJK Unified Ideographs Extension B,C,D,E,F */
- (c32<=0x2FA1F)) return 2; /* CJK Compatibility Ideographs Supplement */
+ /* CJK Compatibility Ideographs Supplement */
+ (c32<=0x3134F)) return 2; /* CJK Unified Ideographs Extension G */
}
return 0;
}