From a482c8683246555bef21fd6e2a7ecb1f5dd3bc0f Mon Sep 17 00:00:00 2001 From: Samantha Baldwin Date: Sat, 9 Sep 2017 16:04:58 -0400 Subject: [PATCH] potentially fix UnicodeEncodeError --- whipper/common/program.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/whipper/common/program.py b/whipper/common/program.py index 84118bd..1f577a8 100644 --- a/whipper/common/program.py +++ b/whipper/common/program.py @@ -604,8 +604,10 @@ class Program: def writeFile(path, length): target_path = common.getRelativePath(path, m3uPath) - f.write(u'#EXTINF:%d,%s\n' % (length, target_path)) - f.write('%s\n' % target_path) + u = u'#EXTINF:%d,%s\n' % (length, target_path) + f.write(u.encode('utf-8')) + u = '%s\n' % target_path + f.write(u.encode('utf-8')) if htoapath: writeFile(htoapath,