Add stripAccents to KStringHandler

Torsten Rahn torsten.rahn at credativ.de
Thu Oct 18 08:37:50 BST 2007


On Thursday 18 October 2007 04:05:16 Frederik Gladhorn wrote:
> 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.

... and Marble which is also using a crude hardcoded list (I could imagine 
everybody reinvents the wheel here because people fail to realize 
what "Normalization" is meant to mean in the Qt docs ... . 

Thanks, this is nice. I'll give it a try.


-- 
 Torsten Rahn

 Tel.: 0 21 61 - 46 43 - 192

credativ GmbH, HRB Mönchengladbach 12080
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz




More information about the kde-core-devel mailing list