gh-148865: Add support for viscii encoding in codecs#148866
Open
henryivesjones wants to merge 2 commits intopython:mainfrom
Open
gh-148865: Add support for viscii encoding in codecs#148866henryivesjones wants to merge 2 commits intopython:mainfrom
henryivesjones wants to merge 2 commits intopython:mainfrom
Conversation
The codecs module does not support the viscii encoding. This change adds support.
Member
|
RFC 1456 was written many years ago, and as such even has a warning:
Is this encoding this used anywhere, is there a need for it to be added (compared to a third party package)? |
Member
serhiy-storchaka
left a comment
There was a problem hiding this comment.
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> | |||
Member
There was a problem hiding this comment.
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 | |||
Member
There was a problem hiding this comment.
This is self-contradictory.
| @@ -0,0 +1,311 @@ | |||
| """Python Character Mapping Codec viscii generated from 'python-mappings/VISCII.TXT' with gencodec.py.""" # " | |||
Member
There was a problem hiding this comment.
Remove reference to python-mappings/VISCII.TXT, it is not an independent source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
VISCIIencoding incodecs#148865