aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-07-30 17:17:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-30 17:17:19 +0000
commitdbe2b683c7ad4b7520a3bfed2d58957d0145c885 (patch)
tree4cb8f695a34d094a7374aadde8664668ce3da7b8 /java/src/com
parente0698ef0a26af6b4a7163dbe9a443cb398efb059 (diff)
parente715a02f4f93a77256f2170b2e921c2446f7819c (diff)
downloadlatinime-dbe2b683c7ad4b7520a3bfed2d58957d0145c885.tar.gz
latinime-dbe2b683c7ad4b7520a3bfed2d58957d0145c885.tar.xz
latinime-dbe2b683c7ad4b7520a3bfed2d58957d0145c885.zip
am e715a02f: am 67bb9d83: am 3a729d4e: [SD12] Add the last remaining scripts
* commit 'e715a02f4f93a77256f2170b2e921c2446f7819c': [SD12] Add the last remaining scripts
Diffstat (limited to 'java/src/com')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/ScriptUtils.java24
1 files changed, 22 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java b/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
index f3df63f45..722591c68 100644
--- a/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
@@ -39,6 +39,11 @@ public class ScriptUtils {
public static final int SCRIPT_SINHALA = 10;
public static final int SCRIPT_THAI = 11;
public static final int SCRIPT_TELUGU = 12;
+ public static final int SCRIPT_DEVANAGARI = 13;
+ public static final int SCRIPT_BENGALI = 14;
+ public static final int SCRIPT_TAMIL = 15;
+ public static final int SCRIPT_KANNADA = 16;
+ public static final int SCRIPT_MALAYALAM = 17;
public static final TreeMap<String, Integer> mSpellCheckerLanguageToScript;
static {
// List of the supported languages and their associated script. We won't check
@@ -102,12 +107,12 @@ public class ScriptUtils {
case SCRIPT_ARABIC:
// Arabic letters can be in any of the following blocks:
// Arabic U+0600..U+06FF
- // Arabic Supplement U+0750..U+077F
+ // Arabic Supplement, Thaana U+0750..U+077F, U+0780..U+07BF
// Arabic Extended-A U+08A0..U+08FF
// Arabic Presentation Forms-A U+FB50..U+FDFF
// Arabic Presentation Forms-B U+FE70..U+FEFF
return (codePoint >= 0x600 && codePoint <= 0x6FF)
- || (codePoint >= 0x750 && codePoint <= 0x77F)
+ || (codePoint >= 0x750 && codePoint <= 0x7BF)
|| (codePoint >= 0x8A0 && codePoint <= 0x8FF)
|| (codePoint >= 0xFB50 && codePoint <= 0xFDFF)
|| (codePoint >= 0xFE70 && codePoint <= 0xFEFF);
@@ -153,6 +158,21 @@ public class ScriptUtils {
case SCRIPT_TELUGU:
// Telugu unicode block is U+0C00..U+0C7F
return (codePoint >= 0xC00 && codePoint <= 0xC7F);
+ case SCRIPT_DEVANAGARI:
+ // Devanagari unicode block is +0900..U+097F
+ return (codePoint >= 0x900 && codePoint <= 0x97F);
+ case SCRIPT_BENGALI:
+ // Bengali unicode block is U+0980..U+09FF
+ return (codePoint >= 0x980 && codePoint <= 0x9FF);
+ case SCRIPT_TAMIL:
+ // Tamil unicode block is U+0B80..U+0BFF
+ return (codePoint >= 0xB80 && codePoint <= 0xBFF);
+ case SCRIPT_KANNADA:
+ // Kannada unicode block is U+0C80..U+0CFF
+ return (codePoint >= 0xC80 && codePoint <= 0xCFF);
+ case SCRIPT_MALAYALAM:
+ // Malayalam unicode block is U+0D00..U+0D7F
+ return (codePoint >= 0xD00 && codePoint <= 0xD7F);
case SCRIPT_UNKNOWN:
return true;
default: