gh-126004: fix positions handling in codecs.replace_errors
#127674
+29
−27
Merged