Message124865
Working on issue 10686, I've discovered that the logic for charset conversion in email.header.Header.append is bogus. It happens to work for most charsets because for most charsets the input codec and the output codec are the same. For shift_jis and euc_jp, however, this is not the case.
The attached patch fixes the logic and provides a test.
The logic is still not quite correct, since the 'errors' parameter should not be passed to the 'encode' test call, because the errors parameter is not passed to the encode call when the actual encoding is done in the Header.encode method. If that call were fixed in this patch, one of the email tests would fail that currently passes. However, if a 'Header.encode' call were made in that test, the encode call would fail. Fixing that will require resolving issue 10686. |
|
Date |
User |
Action |
Args |
2010-12-29 18:38:23 | r.david.murray | set | recipients:
+ r.david.murray |
2010-12-29 18:38:23 | r.david.murray | set | messageid: <1293647903.09.0.559364426725.issue10790@psf.upfronthosting.co.za> |
2010-12-29 18:38:17 | r.david.murray | link | issue10790 messages |
2010-12-29 18:38:17 | r.david.murray | create | |
|