Message372373
UnicodeEncodeError and UnicodeDecodeError are used to report un(en|de)codedable ranges in the source object, so it wouldn't make sense to use them for errors that have nothing to do with problems in the source object. Their constructor requires 5 arguments (encoding, object, start, end, reason), not just a simple message: e.g. UnicodeEncodeError("utf-8", "foo", 17, 23, "bad string").
But for reporting e.g. missing BOMs at the start it would be useful to use (0, 0) as the offending range. |
|
Date |
User |
Action |
Args |
2020-06-25 15:11:54 | doerwalter | set | recipients:
+ doerwalter, lemburg, pitrou, vstinner, benjamin.peterson, ezio.melotti, serhiy.storchaka, thatiparthy, eamanu |
2020-06-25 15:11:54 | doerwalter | set | messageid: <1593097914.59.0.615892632075.issue41115@roundup.psfhosted.org> |
2020-06-25 15:11:54 | doerwalter | link | issue41115 messages |
2020-06-25 15:11:54 | doerwalter | create | |
|