Comment 4 for bug 1003851

Revision history for this message
Colin Watson (cjwatson) wrote :

My initial guess is that we might need something like this at the top level:

if sys.version >= '3':
    # Force encoding to UTF-8 even in non-UTF-8 locales.
    import io
    sys.stderr = io.TextIOWrapper(
        sys.stderr.detach(), encoding="UTF-8", line_buffering=True)