From 3dfba9098d6218798188d67a56ef8828c367dc90 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 18 Jan 2006 18:13:24 +0000 Subject: [PATCH] decode correctly string under linux AND windows. Fixes #1375 --- src/filetransfers_window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py index 92ccb87e2..7965c5922 100644 --- a/src/filetransfers_window.py +++ b/src/filetransfers_window.py @@ -266,7 +266,11 @@ _('Connection with peer cannot be established.')) file_dir = None files_path_list = dialog.get_filenames() for file_path in files_path_list: - file_path = file_path.decode('utf8') + # decode as UTF-8 under win + if os.name == 'nt': + file_path = file_path.decode('utf8') + else: + file_path = file_path.decode(sys.getfilesystemencoding()) if self.send_file(account, contact, file_path) and file_dir is None: file_dir = os.path.dirname(file_path) if file_dir: