[PATCH] KSpell Unicode problem (BR#86940)

Mashrab Kuvatov kmashrab at sat.physik.uni-bremen.de
Fri Feb 18 18:00:27 GMT 2005


Hi Lukáš,

first of all thanks for looking at the issue. Waldo, thanks too.

On Friday 18 February 2005 13:29, Lukáš Tinkl wrote:
> Hmmm, unfortunate situation... Mashrab's patch breaks with older aspells, 
> that's what I feared. Furthermore, KSpell+ASpell5 currently can't cope with 
> any utf8 text at all. Attached patch fixes that.

To my knowledge (correct me if I'm wrong) neither Aspel < 0.60 nor Ispell
supports utf8 spellchecking, they treat input/output in 8-bit encoding. That's
why, actually, I was surprised to see UTF-8 in a list of encodings of control
center. One could argue that it is possible to pass --encoding=utf8 to
Aspell-0.50, but from the documentation of Aspell-0.50 [1] 
<quote>
encoding 
(string) The encoding the input text is in. Valid values are ``utf-8'', 
``iso8859-*'', ``koi8-r'', ``viscii'', ``cp1252'', ``machine unsigned 16'', 
``machine unsigned 32''. However, the aspell utility will currently only 
function correctly with 8-bit encodings. I hope to provide utf-8 support in 
the future.
</quote>

What spellchecker are you using? If Ispell, are you sure it is not a wrapper
around Aspell (some distros dropped Ispell)? If you do not have Aspell-0.60,
how do you spellcheck utf8 texts (like you said Aspell-0.50 cannot do that)?

Thanks for patch, I'll definitely try it once at home. However, I doubt it
solves the problem. Currently, the spellchecking i.e., pass a word to Aspell
and get suggestions, is working very well. No way to blame backend.
The problem, IMHO, is in what happens with suggested word. Namely,
there is a variable called posinline, from how I understand the code it gives
the position of a word being checked in a string. Later, lastpos is
calculated to figure out which word to replace/highlight. The part of a code
which I commented out does crazy things resulting in wrong posinline.
Did anybody understand what I said? It seems it is not clear even to
myself. :-)

1. 
http://aspell.net/0.50-doc/man-html/4_Customizing.html#SECTION00523000000000000000

Cheers,
Mashrab.

PS. I faked a reply cutting&pasting from the archive, since I was not in the 
list. Now I subscribed.
-- 
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/20050218/f1ab5725/attachment.sig>


More information about the kde-core-devel mailing list