Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Fix ptcp154 encoding cyrillic_asian alias #45225

Closed
pjenvey opened this issue Jul 19, 2007 · 2 comments
Closed

[PATCH] Fix ptcp154 encoding cyrillic_asian alias #45225

pjenvey opened this issue Jul 19, 2007 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@pjenvey
Copy link
Member

pjenvey commented Jul 19, 2007

BPO 1757126
Nosy @pjenvey
Files
  • aliases_cyrillic_asian_r56460.diff: patch against trunk r56460
  • 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 = None
    closed_at = <Date 2009-11-17.04:14:47.202>
    created_at = <Date 2007-07-19.20:29:36.000>
    labels = ['library']
    title = '[PATCH] Fix ptcp154 encoding cyrillic_asian alias'
    updated_at = <Date 2009-11-17.04:14:47.167>
    user = 'https://github.com/pjenvey'

    bugs.python.org fields:

    activity = <Date 2009-11-17.04:14:47.167>
    actor = 'pjenvey'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-11-17.04:14:47.202>
    closer = 'pjenvey'
    components = ['Library (Lib)']
    creation = <Date 2007-07-19.20:29:36.000>
    creator = 'pjenvey'
    dependencies = []
    files = ['8120']
    hgrepos = []
    issue_num = 1757126
    keywords = ['patch']
    message_count = 2.0
    messages = ['52914', '95364']
    nosy_count = 1.0
    nosy_names = ['pjenvey']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1757126'
    versions = ['Python 2.6']

    @pjenvey
    Copy link
    Member Author

    pjenvey commented Jul 19, 2007

    This small patch fixes a typo in Lib/encodings/aliases.py, breaking an alias of the ptcp154 codec to cyrillic_asian

    The alias is currently marked as 'cyrillic-asian', which isn't a valid normalized encoding name. The '-' should be normalized to '_' -- it should be 'cyrillic_asian'. Aliases are looked up from the aliases.py mapping by their noramlized name, described as:

    def normalize_encoding(encoding):
    """ Normalize an encoding name.
    
        Normalization works as follows: all non-alphanumeric
        characters except the dot used for Python package names are
        collapsed and replaced with a single underscore, e.g. '  -;#'
        becomes '_'. Leading and trailing underscores are removed.
    
        Note that encoding names should be ASCII only; if they do use
        non-ASCII characters, these must be Latin-1 compatible.
    
    """
    

    @pjenvey pjenvey added stdlib Python modules in the Lib dir labels Jul 19, 2007
    @pjenvey pjenvey changed the title Fix ptcp154 encoding cyrillic_asian alias [PATCH] Fix ptcp154 encoding cyrillic_asian alias Feb 5, 2009
    @pjenvey pjenvey changed the title Fix ptcp154 encoding cyrillic_asian alias [PATCH] Fix ptcp154 encoding cyrillic_asian alias Feb 5, 2009
    @pjenvey
    Copy link
    Member Author

    pjenvey commented Nov 17, 2009

    fixed in r76337, r76338

    @pjenvey pjenvey closed this as completed Nov 17, 2009
    @pjenvey pjenvey closed this as completed Nov 17, 2009
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant