Fixed unicode support (again...) :)

This commit is contained in:
Clement Lefebvre 2013-05-21 21:24:30 +01:00
parent 32b4b90f76
commit e433f8724f

View File

@ -354,14 +354,12 @@ class ApplicationLauncher( easyButton ):
return True
def strip_accents(self, string):
if isinstance(string, unicode):
return string
else:
import unicodedata
try:
value = unicodedata.normalize('NFKD', unicode(string)).encode('UTF8', 'ignore')
except:
value = string
if isinstance(string, unicode):
try:
value = string.encode('UTF8', 'ignore')
except:
pass
return value
def getTooltip( self ):