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,15 +354,13 @@ class ApplicationLauncher( easyButton ):
return True return True
def strip_accents(self, string): def strip_accents(self, string):
value = string
if isinstance(string, unicode): if isinstance(string, unicode):
return string
else:
import unicodedata
try: try:
value = unicodedata.normalize('NFKD', unicode(string)).encode('UTF8', 'ignore') value = string.encode('UTF8', 'ignore')
except: except:
value = string pass
return value return value
def getTooltip( self ): def getTooltip( self ):
tooltip = self.appName tooltip = self.appName