[PATCH] KSpell Unicode problem (BR#86940)

Mashrab Kuvatov kmashrab at sat.physik.uni-bremen.de
Sat Feb 19 00:29:27 GMT 2005


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?

Cheers,
Mashrab.

--
Mashrab Kuvatov
Ph.D student
University of Bremen, IUP
Home-page: www.sat.uni-bremen.de/members/mashrab
PGP key: www.uni-bremen.de/~kmashrab/kmashrab.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050219/b7262789/attachment.sig>


More information about the kde-core-devel mailing list