From 9eb3697b40c40176f2dffcffd5120765b4428684 Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Thu, 29 May 2014 11:51:15 +0100 Subject: [PATCH] Encode all progress stream output as UTF-8 Closes #231. --- fig/progress_stream.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fig/progress_stream.py b/fig/progress_stream.py index b0160f04..2121629b 100644 --- a/fig/progress_stream.py +++ b/fig/progress_stream.py @@ -1,5 +1,6 @@ import json import os +import codecs class StreamOutputError(Exception): @@ -8,6 +9,7 @@ class StreamOutputError(Exception): def stream_output(output, stream): is_terminal = hasattr(stream, 'fileno') and os.isatty(stream.fileno()) + stream = codecs.getwriter('utf-8')(stream) all_events = [] lines = {} diff = 0