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

mailbox.py open() calls don't set encoding #55204

Closed
sdaoden mannequin opened this issue Jan 24, 2011 · 2 comments
Closed

mailbox.py open() calls don't set encoding #55204

sdaoden mannequin opened this issue Jan 24, 2011 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@sdaoden
Copy link
Mannequin

sdaoden mannequin commented Jan 24, 2011

BPO 10995
Nosy @bitdancer
Superseder
  • bpo-9124: Mailbox module should use binary I/O, not text I/O
  • 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 2011-01-24.14:58:43.574>
    created_at = <Date 2011-01-24.14:23:45.925>
    labels = ['type-bug', 'library']
    title = "mailbox.py open() calls don't set encoding"
    updated_at = <Date 2011-01-24.14:58:43.572>
    user = 'https://bugs.python.org/sdaoden'

    bugs.python.org fields:

    activity = <Date 2011-01-24.14:58:43.572>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-01-24.14:58:43.574>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2011-01-24.14:23:45.925>
    creator = 'sdaoden'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 10995
    keywords = []
    message_count = 2.0
    messages = ['126930', '126931']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'sdaoden']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '9124'
    type = 'behavior'
    url = 'https://bugs.python.org/issue10995'
    versions = ['Python 3.1']

    @sdaoden
    Copy link
    Mannequin Author

    sdaoden mannequin commented Jan 24, 2011

    I'm using the en_GB.UTF-8 locale and thus the entire I/O layer defaults to use UTF-8 encoding. Perfect.
    The problem is that mailboxes are *not* and *never* in UTF-8, generally speaking, according to RFC mail standards!

    So i suggest that mailbox.py either offers additional 'encoding="latin1"' constructor arguments or always uses "latin1" in open() calls.
    This suffices to make mailbox.py usable -
    i.e., the mailbox will be loaded/saved without causing encoder errors, and email.py will behave correctly according to message *content* anyway!

    P.S.: i am far from being a Python(1) freak and feel a bit lost on *.python.org, so i might have blown the wrong whistles too load.
    Sorry, if this is the case.
    Thanks for python(1), it's damn slow and i love C and Perl. ;-)

    @sdaoden sdaoden mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jan 24, 2011
    @bitdancer
    Copy link
    Member

    bpo-9124 addresses the underlying problem here, so I'm closing this as a duplicate.

    @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 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant