1 """Modul pro odstranovani diakritiky a zvlastnich znaku."""
4 from spolecne import ABECEDA
7 """Vrati text bez akcentu. Pochybna metoda pouzivajici unicodedata."""
9 for aChar in unicodedata.normalize('NFD', unistr)
10 if not unicodedata.combining(aChar))
12 def ocesat(text, mezery=True):
13 """Odstrani z textu akcenty, zvlastni znaky nahradi mezerami, posloupnost
14 mezer jednou mezerou a prevede vsechna pismena na velka."""
15 text = deaccent(unicode(text)).upper()
30 return ''.join([c for c in text if c in ABECEDA])