Message145801
It's difficult to use unicode_encode_call_errorhandler() because the caller has to:
- resize the output buffer (and check for integer overflow on the new size)
- handle bytes and str for the replacement string: PyUnicode_EncodeDecimal() doesn't support bytes for example
- encode replacement str: some encoders uses ASCII, unicode_encode_ucs1() uses Latin1, PyUnicode_EncodeCharmap() uses a recursive call (without check for infinite loop!), ... ; and raise a UnicodeEncodeError if the encoding fails
It would be nice to factorize this code.
I plan this implement this refactoring, it's just a reminder for me :-) |
|
Date |
User |
Action |
Args |
2011-10-18 11:50:11 | vstinner | set | recipients:
+ vstinner |
2011-10-18 11:50:11 | vstinner | set | messageid: <1318938611.14.0.651217726677.issue13209@psf.upfronthosting.co.za> |
2011-10-18 11:50:10 | vstinner | link | issue13209 messages |
2011-10-18 11:50:10 | vstinner | create | |
|