This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Artoria2e5, benjamin.peterson, eryksun, ezio.melotti, larry, ned.deily, paul.moore, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Date 2016-11-16.20:38:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479328698.45.0.0276153057539.issue28712@psf.upfronthosting.co.za>
In-reply-to
Content
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=',')
History
Date User Action Args
2016-11-16 20:38:18eryksunsetrecipients: + 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:18eryksunsetmessageid: <1479328698.45.0.0276153057539.issue28712@psf.upfronthosting.co.za>
2016-11-16 20:38:18eryksunlinkissue28712 messages
2016-11-16 20:38:18eryksuncreate