diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index 5434106c5..9d828ef91 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -488,6 +488,8 @@ + + diff --git a/java/res/xml/keyboard_layout_set_khmer.xml b/java/res/xml/keyboard_layout_set_khmer.xml index 181f98b3d..752c8520a 100644 --- a/java/res/xml/keyboard_layout_set_khmer.xml +++ b/java/res/xml/keyboard_layout_set_khmer.xml @@ -20,6 +20,8 @@ + + mSpellCheckerLanguageToScript; static { // List of the supported languages and their associated script. We won't check @@ -122,6 +124,14 @@ public class ScriptUtils { // or Georgian supplement block, U+2D00..U+2D2F return (codePoint >= 0x10A0 && codePoint <= 0x10FF || codePoint >= 0x2D00 && codePoint <= 0x2D2F); + case SCRIPT_KHMER: + // Khmer letters are in unicode block U+1780..U+17FF, and the Khmer symbols block + // is U+19E0..U+19FF + return (codePoint >= 0x1780 && codePoint <= 0x17FF + || codePoint >= 0x19E0 && codePoint <= 0x19FF); + case SCRIPT_LAO: + // The Lao block is U+0E80..U+0EFF + return (codePoint >= 0xE80 && codePoint <= 0xEFF); case SCRIPT_UNKNOWN: return true; default: