Ajayalal / scandinavian-keyboard

Automatically exported from code.google.com/p/scandinavian-keyboard
0 stars 0 forks source link

Dictionary::isValidWordRec is case sensitive #81

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call Suggest.isValidWord("Hello") with an English dictionary.

What is the expected output? What do you see instead?
Expected: true (as documented, see below)
Current: false

What version of the product are you using? On what operating system?
Scandinavian Keyboard 1.4.4 on Android 2.1

Please provide any additional information below.
Here's the javadoc from Dictionary.java saying that the search should be case 
insensitive:
    /**
     * Checks if the given word occurs in the dictionary
     * @param word the word to search for. The search should be case-insensitive.
     * @return true if the word exists, false otherwise
     */
    abstract public boolean isValidWord(CharSequence word);

The problem is in dictionary.cpp, where Dictionary::isValidWordRec() does a 
case sensitive search.

Discovered this while implementing the solution for issue 75.

Original issue reported on code.google.com by johan.walles@gmail.com on 10 Oct 2010 at 3:31