gh-148865: Add support for viscii encoding in codecs#148866
gh-148865: Add support for viscii encoding in codecs#148866henryivesjones wants to merge 2 commits intopython:mainfrom
Conversation
The codecs module does not support the viscii encoding. This change adds support.
|
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)? |
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> | |||
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 | |||
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.""" # " | |||
There was a problem hiding this comment.
Remove reference to python-mappings/VISCII.TXT, it is not an independent source.
There was a problem hiding this comment.
(This was generated by the script)
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