mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
#10790: make append work when output codec is different from input codec
There's still a bug here (the encode call shouldn't use the 'errors' paramter), but I'll fix that later.
This commit is contained in:
parent
ca1e7ec344
commit
477efb3944
4 changed files with 25 additions and 23 deletions
|
@ -3620,6 +3620,10 @@ A very long line that must get split to something other than at the
|
|||
s = 'Subject: =?EUC-KR?B?CSixpLDtKSC/7Liuvsax4iC6uLmwMcijIKHaILzSwd/H0SC8+LCjwLsgv7W/+Mj3I ?='
|
||||
raises(errors.HeaderParseError, decode_header, s)
|
||||
|
||||
def test_shift_jis_charset(self):
|
||||
h = Header('文', charset='shift_jis')
|
||||
self.assertEqual(h.encode(), '=?iso-2022-jp?b?GyRCSjgbKEI=?=')
|
||||
|
||||
|
||||
|
||||
# Test RFC 2231 header parameters (en/de)coding
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue