Fixed unicode support (again...) :)
This commit is contained in:
parent
32b4b90f76
commit
e433f8724f
@ -354,14 +354,12 @@ class ApplicationLauncher( easyButton ):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def strip_accents(self, string):
|
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
|
value = string
|
||||||
|
if isinstance(string, unicode):
|
||||||
|
try:
|
||||||
|
value = string.encode('UTF8', 'ignore')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def getTooltip( self ):
|
def getTooltip( self ):
|
||||||
|
Loading…
Reference in New Issue
Block a user