You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow backslashreplace error handler to be used on input #66482
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/serhiy-storchaka'closed_at=<Date2015-01-27.08:54:56.094>created_at=<Date2014-08-27.10:50:20.603>labels= ['extension-modules', 'type-feature']
title='Allow backslashreplace error handler to be used on input'updated_at=<Date2015-01-27.08:54:56.094>user='https://github.com/ncoghlan'
In the discussion on bpo-18814, Antoine pointed out that in a Python 3 world, using backslashescape during decoding actually makes sense - it lets you accurately report arbitrary bytes in the sequence, without needing surrogateescape or surrogatepass to be used when encoding later.
Activity
ncoghlan commentedon Aug 27, 2014
In the discussion on bpo-18814, Antoine pointed out that in a Python 3 world, using backslashescape during decoding actually makes sense - it lets you accurately report arbitrary bytes in the sequence, without needing surrogateescape or surrogatepass to be used when encoding later.
serhiy-storchaka commentedon Sep 23, 2014
Here is a patch.
serhiy-storchaka commentedon Nov 25, 2014
Synchronized with the tip (resolved conflicts with bpo-22470 and bpo-19676).
serhiy-storchaka commentedon Jan 16, 2015
Could you make a review Nick to get this feature in the first alpha.
ncoghlan commentedon Jan 24, 2015
+1 from me for merging, although I suspect you'll need to adjust the codecs.rst changes first.
python-dev commentedon Jan 25, 2015
New changeset dd8a03e98158 by Serhiy Storchaka in branch 'default':
Issue bpo-22286: The "backslashreplace" error handlers now works with
https://hg.python.org/cpython/rev/dd8a03e98158
bitdancer commentedon Jan 25, 2015
Looks like the buildbots aren't happy with this change.
serhiy-storchaka commentedon Jan 25, 2015
Yes, I see. The patch exposed existing bug in decoding error handing. See bpo-23321 for this.
python-dev commentedon Jan 26, 2015
New changeset 1e8937861ee3 by Victor Stinner in branch 'default':
Issue bpo-22286, bpo-23321: Fix failing test on Windows code page 932
https://hg.python.org/cpython/rev/1e8937861ee3