From 6994188c715e9c3cb83a701e35db29bc0fcfb8de Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Tue, 21 May 2013 11:00:55 +0100 Subject: [PATCH] Fixed mintMenu not working properly in Korean (don't re-encode unicode strings) --- .../linuxmint/mintMenu/plugins/easybuttons.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py index dc8fdec..7e899e5 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py +++ b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py @@ -353,13 +353,16 @@ class ApplicationLauncher( easyButton ): self.show() return True - def strip_accents(self, string): - import unicodedata - try: - value = unicodedata.normalize('NFKD', unicode(string)).encode('UTF8', 'ignore') - except: - value = string - return value + 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 + return value def getTooltip( self ): tooltip = self.appName