Skip to content

email.charset: viscii charset registered but no Python codec exists #145834

@stefanzetzsche

Description

@stefanzetzsche

Bug report

Bug description:

Issue

The email.charset module registers viscii in its CHARSETS dict with QP header and body encoding, but Python has no built-in codec named viscii. Any encoding operation on Charset('viscii') raises LookupError.

Reproducer

from email.charset import Charset
cs = Charset('viscii')
cs.header_encode('')  # LookupError: unknown encoding: viscii

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions