Issue 27959: Add 'oem' encoding (original) (raw)

Created on 2016-09-05 23:41 by steve.dower, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
27959_1.patch steve.dower,2016-09-06 00:33 review
27959_2.patch steve.dower,2016-09-06 01:30
27959_3.patch vstinner,2016-09-06 22:36 review
Messages (12)
msg274470 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-05 23:41
Currently the ANSI encoding is available on Windows as 'mbcs', however the OEM encoding (sometimes used by console-based applications) is not easily available. The implementation is identical to PyUnicode_DecodeMBCS[Stateful], simply passing CP_OEM instead of CP_ACP.
msg274471 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-05 23:43
While I'm here, should also move `aliasmbcs` from site.py into initialization - no reason for this behaviour to depend on importing site.
msg274482 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-06 00:33
Initial patch attached - tests to follow.
msg274487 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-06 00:50
Forgot to include the oem.py file in that patch, but it's basically identical to mbcs.py except calling 'oem_encode' and 'oem_decode'. It'll be in the next one
msg274491 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-06 01:30
Addressed most of the feedback, though I think having a fallback search function instead of the alias is better.
msg274645 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-06 22:36
Rebased patch to get a review button.
msg274714 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-07 02:43
New changeset c499690f606c by Steve Dower in branch 'default': Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup https://hg.python.org/cpython/rev/c499690f606c
msg274716 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-07 02:47
New changeset fd0e62300fb7 by Steve Dower in branch 'default': Issue #27959: Documents new encoding and alias. https://hg.python.org/cpython/rev/fd0e62300fb7
msg274719 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-07 02:56
New changeset 786c34bdc27a by Steve Dower in branch 'default': Issue #27959: Updates NEWS and whatsnew https://hg.python.org/cpython/rev/786c34bdc27a
msg274832 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-07 16:33
New changeset 47b4dbd451f5 by Steve Dower in branch 'default': Issue #27959: Prevent ImportError from escaping codec search function https://hg.python.org/cpython/rev/47b4dbd451f5
msg275323 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-09 15:57
New changeset 4e80a157ea66 by Steve Dower in branch 'default': Revert #27959: ImportError within an encoding module should also skip the encoding https://hg.python.org/cpython/rev/4e80a157ea66
msg275324 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-09 15:58
Last commit was supposed to be for
History
Date User Action Args
2022-04-11 14:58:35 admin set github: 72146
2016-09-09 15:58:00 steve.dower set messages: +
2016-09-09 15:57:13 python-dev set messages: +
2016-09-07 16:33:27 python-dev set messages: +
2016-09-07 02:56:12 python-dev set messages: +
2016-09-07 02:48:30 steve.dower set status: open -> closedtype: enhancementresolution: fixedstage: resolved
2016-09-07 02:47:00 python-dev set messages: +
2016-09-07 02:43:01 python-dev set nosy: + python-devmessages: +
2016-09-06 22:36:07 vstinner set files: + 27959_3.patchmessages: +
2016-09-06 01:30:41 steve.dower set files: + 27959_2.patchmessages: +
2016-09-06 00:50:52 steve.dower set messages: +
2016-09-06 00:33:47 steve.dower set files: + 27959_1.patchkeywords: + patchmessages: +
2016-09-05 23:43:33 steve.dower set messages: +
2016-09-05 23:41:40 steve.dower create