From f263935a519bac46c34103bee5eb2c75b3ec346e Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Tue, 20 Jan 2015 16:51:44 +0100 Subject: [PATCH] Prevent shlex.split from returning strange encodings --- beets/ui/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index ea70b5170..2d8d4a8a9 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -1494,9 +1494,9 @@ def config_edit(): path = config.user_config_path() if 'EDITOR' in os.environ: - editor = os.environ['EDITOR'] + editor = os.environ['EDITOR'].encode('utf8') try: - editor = shlex.split(editor) + editor = [e.decode('utf8') for e in shlex.split(editor)] except ValueError: # Malformed shell tokens. editor = [editor] args = editor + [path]