Nick Coghlan added the comment: On 23 Aug 2013 01:40, "R. David Murray" <rep...@bugs.python.org> wrote: . (I double checked, and this does indeed work...doing the equivalent of ls >temp via python preserves the bytes with that PYTHONIOENCODING setting. I don't quite understand, however, why I get the � chars if I don't redirect the output.).
I assume the terminal window is doing the substitution for the improperly encoded bytes. Regarding the issue, perhaps we should convert this to a docs bug? Attempt to make the "PYTHONIOENCODING=utf-8:surrogateescape" easier to discover? Heck, it may be worth creating a stable URL that we can include in surrogate related error messages... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com