This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients anthonypjshaw, atalaba, iritkatriel, serhiy.storchaka, vstinner
Date 2021-09-27.15:02:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I am working on it, since it is more complex issue, and PR 13134 does not solve it.

1. This bug affects also other codecs implemented in C: ASCII, Latin1, UTF-8, etc.
2. It still crashes in UTF-16/32 encoders if the error handler returns a position less than the current position.
3. Incorrect exception can be raised if the error handler returns invalid string/bytes: a non-ASCII string or a bytes object consisting of not a whole number of units.
4. The code for standard error handlers and for decoders needs a revision too. I have some suspects.

We could just forbid error handlers returning position not in the range (start , end], but it can break some code, so it is better to do this only in a new release.
Date User Action Args
2021-09-27 15:02:52serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, anthonypjshaw, atalaba, iritkatriel
2021-09-27 15:02:52serhiy.storchakasetmessageid: <>
2021-09-27 15:02:52serhiy.storchakalinkissue36819 messages
2021-09-27 15:02:52serhiy.storchakacreate