← 输入框|github.com|刷新
Skip to content

Add 'oem' encoding #72146

Closed
Closed

Description

@zooba
BPO 27959
Nosy @pfmoore, @vstinner, @tjguk, @zware, @zooba
Files
  • 27959_1.patch
  • 27959_2.patch
  • 27959_3.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2016-09-07.02:48:30.530>
    created_at = <Date 2016-09-05.23:41:40.307>
    labels = ['type-feature', 'OS-windows']
    title = "Add 'oem' encoding"
    updated_at = <Date 2016-09-09.15:58:00.280>
    user = 'https://github.com/zooba'

    bugs.python.org fields:

    activity = <Date 2016-09-09.15:58:00.280>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2016-09-07.02:48:30.530>
    closer = 'steve.dower'
    components = ['Windows']
    creation = <Date 2016-09-05.23:41:40.307>
    creator = 'steve.dower'
    dependencies = []
    files = ['44387', '44388', '44405']
    hgrepos = []
    issue_num = 27959
    keywords = ['patch']
    message_count = 12.0
    messages = ['274470', '274471', '274482', '274487', '274491', '274645', '274714', '274716', '274719', '274832', '275323', '275324']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'python-dev', 'zach.ware', 'steve.dower']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue27959'
    versions = ['Python 3.6']

    Activity

    1. zooba commented on Sep 5, 2016

      @zooba
      MemberAuthor

      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.

    2. self-assigned this
      on Sep 5, 2016
    3. zooba commented on Sep 5, 2016

      @zooba
      MemberAuthor

      While I'm here, should also move aliasmbcs from site.py into initialization - no reason for this behaviour to depend on importing site.

    4. zooba commented on Sep 6, 2016

      @zooba
      MemberAuthor

      Initial patch attached - tests to follow.

    5. zooba commented on Sep 6, 2016

      @zooba
      MemberAuthor

      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

    6. zooba commented on Sep 6, 2016

      @zooba
      MemberAuthor

      Addressed most of the feedback, though I think having a fallback search function instead of the alias is better.

    7. vstinner commented on Sep 6, 2016

      @vstinner
      Member

      Rebased patch to get a review button.

    8. python-dev commented on Sep 7, 2016

      python-devmannequin
      Mannequin

      New changeset c499690f606c by Steve Dower in branch 'default':
      Issue bpo-27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup
      https://hg.python.org/cpython/rev/c499690f606c

    9. python-dev commented on Sep 7, 2016

      python-devmannequin
      Mannequin

      New changeset fd0e62300fb7 by Steve Dower in branch 'default':
      Issue bpo-27959: Documents new encoding and alias.
      https://hg.python.org/cpython/rev/fd0e62300fb7

    10. python-dev commented on Sep 7, 2016

      python-devmannequin
      Mannequin

      New changeset 786c34bdc27a by Steve Dower in branch 'default':
      Issue bpo-27959: Updates NEWS and whatsnew
      https://hg.python.org/cpython/rev/786c34bdc27a

    11. python-dev commented on Sep 7, 2016

      python-devmannequin
      Mannequin

      New changeset 47b4dbd451f5 by Steve Dower in branch 'default':
      Issue bpo-27959: Prevent ImportError from escaping codec search function
      https://hg.python.org/cpython/rev/47b4dbd451f5

    12. python-dev commented on Sep 9, 2016

      python-devmannequin
      Mannequin

      New changeset 4e80a157ea66 by Steve Dower in branch 'default':
      Revert bpo-27959: ImportError within an encoding module should also skip the encoding
      https://hg.python.org/cpython/rev/4e80a157ea66

    13. zooba commented on Sep 9, 2016

      @zooba
      MemberAuthor

      Last commit was supposed to be for bpo-28005

    14. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions