Message318726
ISO-2022-* is "stateful" encoding. It uses escape sequence to change state.
So keeping only `pending` is not enough.
>>> enc.encode("abcあいう")
b'abc\x1b$B$"$$$&'
>>> enc.getstate()
0
>>> enc.encode("abc")
b'\x1b(Babc'
>>> enc.encode("abcあいう")
b'abc\x1b$B$"$$$&'
>>> enc.getstate()
0
>>> enc.setstate(0)
>>> enc.encode("abc")
b'abc'
I don't know much about other encodings. |
|
Date |
User |
Action |
Args |
2018-06-05 08:20:37 | methane | set | recipients:
+ methane, martin.panter, libcthorne |
2018-06-05 08:20:37 | methane | set | messageid: <1528186837.02.0.592728768989.issue33578@psf.upfronthosting.co.za> |
2018-06-05 08:20:37 | methane | link | issue33578 messages |
2018-06-05 08:20:36 | methane | create | |
|