[issue22016] Add a new 'surrogatereplace' output only error handler

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: Follow-up: the PEP 538 (bpo-28180) and PEP 540 (bpo-29240) have been accepted and implemented in Python 3.7! -- nosy: +vstinner ___ Python tracker __

[issue22016] Add a new 'surrogatereplace' output only error handler

2014-08-21 Thread Nick Coghlan
Nick Coghlan added the comment: Stephen Turnbull suggested on python-dev that this was a bad idea, and after reconsidering the current behaviour in Python 2, I realised that setting surrogateescape and letting the terminal deal with the consequences is exactly what we want. What confused me i

[issue22016] Add a new 'surrogatereplace' output only error handler

2014-07-20 Thread Nick Coghlan
New submission from Nick Coghlan: This would be along the same lines as xmlcharrefreplace and backslashreplace, but only affect surrogate escaped characters. Unlike surrogate escape, which reproduces the escaped characters directly in the data stream, this would follow the 'replace' error hand