From 6a2d835eab2f814d5d7c7c3b19888cee91432b70 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 23 Oct 2011 18:55:14 +0200 Subject: [PATCH] fix some encoding problems when looking for plugin config with non-ascii chars in path. Fixes #7015 --- src/gajim.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 6187207d8..486e953d3 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -142,10 +142,11 @@ def parseOpts(): config_path_ = a return profile_, config_path_ +import locale profile, config_path = parseOpts() +config_path = unicode(config_path, locale.getpreferredencoding()) del parseOpts -import locale profile = unicode(profile, locale.getpreferredencoding()) import common.configpaths @@ -155,8 +156,8 @@ common.configpaths.gajimpaths.init_profile(profile) del profile if os.name == 'nt': - plugins_locale_dir = str(os.path.join(common.configpaths.gajimpaths[ - 'PLUGINS_USER'], 'locale')) + plugins_locale_dir = os.path.join(common.configpaths.gajimpaths[ + 'PLUGINS_USER'], 'locale').encode(locale.getpreferredencoding()) libintl.bindtextdomain('gajim_plugins', plugins_locale_dir) libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')