From aeda8a7798fa1a028998cf4c81397de8a06610a9 Mon Sep 17 00:00:00 2001 From: Tom Ouyang Date: Sat, 24 Mar 2012 15:31:27 +0900 Subject: [PATCH] Change the first character check in bigram dictionary to be case insensitive. Bug: 6188977 Change-Id: I121c1abf245c7f8734730810c07d3351b1ec581a --- native/src/bigram_dictionary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/src/bigram_dictionary.cpp b/native/src/bigram_dictionary.cpp index fa69de854..3704c47e6 100644 --- a/native/src/bigram_dictionary.cpp +++ b/native/src/bigram_dictionary.cpp @@ -151,8 +151,9 @@ bool BigramDictionary::checkFirstCharacter(unsigned short *word) { int *inputCodes = mInputCodes; int maxAlt = MAX_ALTERNATIVES; + const unsigned short firstBaseChar = toBaseLowerCase(*word); while (maxAlt > 0) { - if ((unsigned int) *inputCodes == (unsigned int) *word) { + if (toBaseLowerCase(*inputCodes) == firstBaseChar) { return true; } inputCodes++;