[PATCH] KSpell Unicode problem (BR#86940)
Lukáš Tinkl
lukas at kde.org
Sat Feb 19 10:26:01 GMT 2005
Dne so 19. února 2005 1:29 Mashrab Kuvatov napsal(a):
> On Friday 18 February 2005 21:20, Lukáš Tinkl wrote:
> > And yes, my aspell does support utf8 correctly, the comment is perhaps
> > wrong and has probably been added in an earlier version; ispell doesn't
> > seem to support utf8 at all.
>
> It seems you are right. However, ...
>
> > I said KSpell (with ASpell) couldn't check UTF-8 text.
>
> That is correct. It worked for me so far since default encoding was utf-8.
> So, your patch should be committed in any case.
>
> Now comes the interesting part. I took your example (it is Czech, isn't
> it?) and tried it with aspell-0.50 and 0.60 in a pipe mode, that's how
> kspell is using aspell/ispell, isn't it? Please have a look at the result,
> it is at
>
> http://www.uni-bremen.de/~kmashrab/aspell-0.50-bug.png
>
> From the screenshot one can see that for the first misspelled word "vam"
> apell-0.60 gives "& vam 61 27: ...", but aspell-0.50 gives "& vam 48 31:
> ...". Fist number is suggestion counter and the second is the offset from
> the beginning of the line in characters. Correct value of an offset in this
> case is
> 27, not 31. Apparently, aspell-0.50 "thinks" in 8-bit encoding. I do not
> know if it is bug or not.
>
> Now I understand what that piece of code I commented out was for, it was
> just a workaround. One does not need that for Aspell-0.60.
>
> I vote for "#ifdef HAVE_ASPELL_60" approach. I do not know how to implement
> it, though.
>
> What do the others think? Any idea how to solve it?
Yes, I wanted to suggest the ifdef approach too; anyone volunteers to write
the configure check? :)
--
Lukáš Tinkl <lukas at kde.org>
KDE developer
To iterate is human, to recurse, divine.
More information about the kde-core-devel
mailing list