Add stripAccents to KStringHandler

Frederik Gladhorn frederik.gladhorn at gmx.de
Thu Oct 18 18:45:23 BST 2007


El Thursday 18 October 2007, Thiago Macieira escribió:
> Em Thursday 18 October 2007 14:34:20 Josef Spillner escreveu:
> > On Thursday 18 October 2007 14:08:51 Thiago Macieira wrote:
> > > In the specific case of Parley, "getting the accents wrong" isn't
> > > enough. You have to match other language specificities: for instance,
> > > in German, ö is the same as "oe" and ß is the same as "ss" (but not in
> > > all cases, AFAIU), but ß isn't the same as β (Greek Beta).
> >
> > I also think that a more generic mechanism, like stringprep profiles, are
> > better than "removing accents" for string matching purposes.
> > Other people already care about locale-aware semantic matching, we should
> > care about giving it a nice API (to free people from the madness of ICU
> > etc.) instead of wasting our manpower to reinvent mapping mechanisms.
>
> Stringprep does make sense.
>
> Qt implements the IDNA stringprep only (a.k.a. nameprep RFC 3491).

Hi you all,
thanks for all the input, I agree that this would only be a temporary 
solution. So it should definitively not go into KStringHandler.

Can you point me to further material on stringprep? I looked briefly but could 
not find anything really helpful.

Right now I just want to be able to give feedback of the kind "you have made 
an accent mistake", instead of just saying "you are wrong".
KHangMan and Kanagram will use it to check if the right letter was entered 
because for the HangMan game for example using all accents and everything can 
be a little too complicated (target audience are children).
These are all rather limited cases and I hope we won't run into trouble with 
other languages.
As we all know computer linguistics is not an easy field, so I would be happy 
about further suggestions. I also started looking at some spellchecker code.

I agree with Torsten insofar as that after reading the Qt docs I didn't 
realize the unicode decomposition was what I wanted. Maybe some hint could be 
added to the documentation. I realized this should be possible with Qt only 
after reading a lot of the unicode.org stuff (not fun) and then some of the 
ICU docs. Afterwards the Qt docs made more sense, but still tough.

So for now we'll leave it in the individual apps.
Thanks again,
Frederik


-- 
Parley - The Vocabulary Trainer
http://edu.kde.org/parley/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071018/6495ab39/attachment.sig>


More information about the kde-core-devel mailing list