Message315808
That's because the stream isn't transcoding, since UTF-8 is ASCII-compatible. Try using something not ASCII-compatible as the codec e.g. 'ibm500' and it'll give incorrect results.
```
b = io.BytesIO(u'a,b\r\n"asdf","jkl;"\r\n'.encode('ibm500'))
s = codecs.EncodedFile(b, 'ibm500')
```
```
Got header: '\x81k\x82\r%'
Skipping the header. '\x7f\x81\xa2\x84\x86\x7fk\x7f\x91\x92\x93^\x7f\r%'
Line 2: '\x81k\x82\r%'
Line 3: '\x7f\x81\xa2\x84\x86\x7fk\x7f\x91\x92\x93^\x7f\r%'
``` |
|
Date |
User |
Action |
Args |
2018-04-26 18:02:41 | da | set | recipients:
+ da, Elena.Oat |
2018-04-26 18:02:41 | da | set | messageid: <1524765761.74.0.682650639539.issue33361@psf.upfronthosting.co.za> |
2018-04-26 18:02:41 | da | link | issue33361 messages |
2018-04-26 18:02:41 | da | create | |
|