Skip to content

Provide the MIME name for encodings #149873

@serhiy-storchaka

Description

@serhiy-storchaka

Feature or enhancement

In many cases the name of the encoding matches the preferred MIME name, ignoring case and punctuation. But in some cases it is different (e.g. "ascii" vs "US-ASCII"). Python often accepts non-MIME names as well as MIME names, but other software can be more picky. Providing the preferred MIME name will allow to generate more standard documents (XML, emails, etc). We can add a public optional attribute mime_name to CodecInfo.

cc @malemburg

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-unicodetype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions