Message280989
I don't think the 2nd tuple element is useful when decoding a single byte. It either works or it doesn't, such as failing for non-ASCII bytes with multibyte codepages such as 932 and 950.
I'm attaching the output from the following, which you should be able to open in a spreadsheet:
import codecs
codepages = [424, 856, 857, 864, 869, 874, 932, 949, 950,
1250, 1251, 1252, 1253, 1254, 1255, 1257, 1258]
for cp in codepages:
table = []
for i in range(256):
try:
c = codecs.code_page_decode(cp, bytes([i]), None, True)
c = ascii(c[0])
except Exception:
c = None
table.append(c)
print(cp, *table, sep=',') |
|
Date |
User |
Action |
Args |
2016-11-16 20:38:18 | eryksun | set | recipients:
+ eryksun, paul.moore, vstinner, larry, tim.golden, benjamin.peterson, ned.deily, ezio.melotti, zach.ware, serhiy.storchaka, steve.dower, Artoria2e5 |
2016-11-16 20:38:18 | eryksun | set | messageid: <1479328698.45.0.0276153057539.issue28712@psf.upfronthosting.co.za> |
2016-11-16 20:38:18 | eryksun | link | issue28712 messages |
2016-11-16 20:38:18 | eryksun | create | |
|