Message145801
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2011年10月18日.11:50:10 |
| SpamBayes Score |
6.1107335e-07 |
| Marked as misclassified |
No |
| Message-id |
<1318938611.14.0.651217726677.issue13209@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 :-) |
|
History
|
|---|
| 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 |
|