Skip to content

gh-148865: Add support for viscii encoding in codecs#148866

Open
henryivesjones wants to merge 2 commits intopython:mainfrom
henryivesjones:viscii-encoding-support
Open

gh-148865: Add support for viscii encoding in codecs#148866
henryivesjones wants to merge 2 commits intopython:mainfrom
henryivesjones:viscii-encoding-support

Conversation

@henryivesjones
Copy link
Copy Markdown
Contributor

@henryivesjones henryivesjones commented Apr 22, 2026

The codecs module does not support the viscii encoding. This change adds support.

The mapping was generated from and checked against the viscii rfc1456.

The vietstd was the author of that rfc and has also published this table which was also used as reference.
https://vietstd.sourceforge.net/document/unicode.html

The codecs module does not support the viscii encoding. This change adds support.
@StanFromIreland
Copy link
Copy Markdown
Member

RFC 1456 was written many years ago, and as such even has a warning:

This RFC is not endorsed by the IETF and has no formal standing

Is this encoding this used anywhere, is there a need for it to be added (compared to a third party package)?

@picnixz picnixz added the pending The issue will be closed if no feedback is provided label Apr 22, 2026
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we accept this codec (this is still discussed), it needs also an entry in What's New.

@@ -0,0 +1,264 @@
# Name: VISCII (RFC1456) to Unicode
# Date: 2026-04-22
# Authors: Henry Jones <2020henryijones@gmail.com>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an official document. No need to include this file, it has the same authority as viscii.py.

@@ -0,0 +1,2 @@
``codecs`` does not support the viscii charset. It now supports the viscii
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is self-contradictory.

Comment thread Lib/encodings/viscii.py
@@ -0,0 +1,311 @@
"""Python Character Mapping Codec viscii generated from 'python-mappings/VISCII.TXT' with gencodec.py.""" # "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove reference to python-mappings/VISCII.TXT, it is not an independent source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review pending The issue will be closed if no feedback is provided

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants