From 380935e3e196e8ddff408d6600c9b6c3266f8363 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Tue, 22 Jul 2008 02:23:15 +0000 Subject: [PATCH] 0002246: Files with non-ascii characters can not be opened from the Media View svn: r10899 --- src/Utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Utils.py b/src/Utils.py index 1b6c397cf..f2770ae80 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -1092,6 +1092,11 @@ def launch(prog_str, path): prog_str = prog_str.replace("%1", path) else: prog_str = '%s "%s"' % (prog_str, path) + + # The string must be encoded using the filesystem encoding on Windows. + # Otherwise, files with non-ascii characters in their names will not + # open. + prog_str = prog_str.encode(sys.getfilesystemencoding()) subprocess.Popen(prog_str) else: