diff options
Diffstat (limited to 'Build/source/texk/upmendex/sort.c')
-rw-r--r-- | Build/source/texk/upmendex/sort.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Build/source/texk/upmendex/sort.c b/Build/source/texk/upmendex/sort.c index 5d11a0727c0..15272dc8594 100644 --- a/Build/source/texk/upmendex/sort.c +++ b/Build/source/texk/upmendex/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; } |