Rudolph wrote:
Gabor, that's the way to go. I found this article in the online Python
Cookbook http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/251871
The last suggestion in de comments seems the most ellegant:
unicodedata.normalize('NFKD', input).encode('ASCII', 'ignore')
I didn't test this but is seems very usable.
Will this or something like this be integrated into Django?
This won't work for cyrillic scripts at all. Most cyrillic letters are
single glyphs but they are outside ASCII. So this code would almost
always return '????????'.
That said there is actually no good automatic method to slugify cyrillic
scripts (may be some others also). On many russian blogs though people
do some automatic transliteration but this looks just ugly: words from
one language written with glyphs from other one.