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 era
Recipients era, kamthorn, lemburg, loewis
Date 2017-08-29.08:48:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503996482.58.0.220200856131.issue854511@psf.upfronthosting.co.za>
In-reply-to
Content
Closing the entire enhancement request just because one detail is off seems insane.

Anyway, until the day in the distant future when Python can support encoding names in common circulation, http://stackoverflow.com/a/1064191/874188 offers a crude workaround.


import encodings

if 'windows_874' not in encodings.aliases.aliases:
    encodings.aliases.aliases['windows_874'] = 'cp874'

This is tricky in a number of ways; in practice, this snippet needs to be at the very start of your source file. Also, the underscore is correct even for email encoding names like =?windows-874?Q?hello=3F?= which use a dash (the dash gets remapped to underscore internally when looking up the encoding alias).
History
Date User Action Args
2017-08-29 08:48:02erasetrecipients: + era, lemburg, loewis, kamthorn
2017-08-29 08:48:02erasetmessageid: <1503996482.58.0.220200856131.issue854511@psf.upfronthosting.co.za>
2017-08-29 08:48:02eralinkissue854511 messages
2017-08-29 08:48:02eracreate