Add stripAccents to KStringHandler

Frederik Gladhorn frederik.gladhorn at gmx.de
Thu Oct 18 03:05:16 BST 2007


Hi list,
I would like to add one function to KStringHandler which will be used to 
remove accents from QStrings.

This includes all sorts of char variations. "Häáàâllo" will become "Haaaallo".

At this moment KHangMan has code like this to do the same with a list of 
accent chars hardcoded. The list is incomplete and not very reliable. Adding 
support for new languages requires code changes to handle special characters 
right now. This can be avoided by using the unicode functions.
The same applies to Kanagram.

Parley uses the attached method to give feedback for accent mistakes.

The KStringHandler class seems to be the right place for the function. Since 
it only adds a function it is binary compatible.

Please let me know if the patch is ok.

Greetings,
Frederik


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




-------------- next part --------------
A non-text attachment was scrubbed...
Name: stripaccents.patch
Type: text/x-diff
Size: 1726 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071018/5e45b955/attachment.patch>
-------------- 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/5e45b955/attachment.sig>


More information about the kde-core-devel mailing list