Change the first character check in bigram dictionary to be case insensitive.

Bug: 6188977
Change-Id: I121c1abf245c7f8734730810c07d3351b1ec581a
This commit is contained in:
Tom Ouyang 2012-03-24 15:31:27 +09:00
parent fce9ca4202
commit aeda8a7798

View file

@ -151,8 +151,9 @@ bool BigramDictionary::checkFirstCharacter(unsigned short *word) {
int *inputCodes = mInputCodes; int *inputCodes = mInputCodes;
int maxAlt = MAX_ALTERNATIVES; int maxAlt = MAX_ALTERNATIVES;
const unsigned short firstBaseChar = toBaseLowerCase(*word);
while (maxAlt > 0) { while (maxAlt > 0) {
if ((unsigned int) *inputCodes == (unsigned int) *word) { if (toBaseLowerCase(*inputCodes) == firstBaseChar) {
return true; return true;
} }
inputCodes++; inputCodes++;