Skip to main content

viscii codec support

Project description

viscii-codec

viscii-codec is a Python package adding support for the viscii codecs. viscii is a legacy vietnamese language codec.

This package has been tested on python 3.8, 3.8, 3.10, 3.11, 3.12, 3.13, and 3.14. It may work on other versions but they have not been tested.

Installation

The viscii-codec package is available on pypi and can be installed using any package manager.

pip install viscii-codec
uv add viscii-codec

Usage

To encode "Xin chào, thế giới!" (Hello World! according to translate) using viscii use:

# You must import the package to register the codec.
>>> import viscii
>>> "Xin chào, thế giới!".encode('viscii')
b'Xin ch\xe0o, th\xaa gi\xbei!'

To decode viscii bytes into unicode use:

>>> import viscii
>>> b'Xin ch\xe0o, th\xaa gi\xbei!'.decode('viscii')
'Xin chào, thế giới!'

Sources

The mapping was generated from RFC-1456 and cross referenced with the vietstd report of September 1992.

Testing

% python -m unittest
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viscii_codec-1.0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viscii_codec-1.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file viscii_codec-1.0.1.tar.gz.

File metadata

  • Download URL: viscii_codec-1.0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.2

File hashes

Hashes for viscii_codec-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a011636b4b4aec765859636197e7f0d65293a13bb03bb5457727adbc68cc2d85
MD5 48d341e8060f90d9f8e4eca7c9aec582
BLAKE2b-256 99ebe615f6c918ba5be62fa51db60a2b777a80fccd0e87c40695e232bd9f639f

See more details on using hashes here.

File details

Details for the file viscii_codec-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for viscii_codec-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3af093d3a1a7f1612e070f567310c10603069b9658ac8a8f75bc01c161a398bb
MD5 3518094dc94481e8f1aadda98ab6e387
BLAKE2b-256 f1f953b35fcdea7d0c11fee3aa9b7d47bfd18b218e00f7023ee8b9408c7e311f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page