gh-126004: fix positions handling in codecs.backslashreplace_errors
#127676
+69
−66
codecs.backslashreplace_errors
#127676