[prev in list] [next in list] [prev in thread] [next in thread] 

List:       aspell-devel
Subject:    Re: [aspell-devel] Some words initially treated as misspelled
From:       Pete Black <theblackpeter () gmail ! com>
Date:       2009-02-17 22:14:22
Message-ID: 499B36BE.8030006 () gmail ! com
[Download RAW message or body]

Kevin Atkinson wrote:
> On Tue, 17 Feb 2009, Pete Black wrote:
> 
>> Hey everybody,
>>
>> I'm using Aspell in a Qt C++ application. Everything works great,
>> however there is one issue I've had off and on. For some reason, some
>> words, like "misspelled" or "application", come up as misspelled the
>> first time they are entered. That is, I can check any word, both
>> misspelled or correct, but as soon as I enter these particular words the
>> first time they get treated as misspelled.
>>
>> For example calling aspell_speller_check() with these word results in:
>>
>>  "OK" -> correct (returned 1)
>>  "ok" -> incorrect (returned 0)
> 
> "ok" (lowercase version) should be incorrect, since the correct spelling
> is "OK" (all uppercase)
> 

Right, that was used to illustrate the process.

>>  "misspelled" -> incorrect (returned 0)
>>  "misspelled" -> correct (returned 1)
> 
> Please make sure that you are trying the exact same string by doing a
> byte for byte comparison of the string after it is converted to UTF-8. 
> If If there is no different please try to reproduce the problem in a
> standalone program (preferably without any Qt dependencies).

Great suggestion. You're right, no issues in a pure C++ environment.
Turns out I was doing the wrong conversion. For future reference
.toLocal8Bit() is the proper way to go.

Thanks for your fast response and sorry about the traffic.

Pete




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic