Metadata-Version: 2.3
Name: viscii-codec
Version: 1.0.0
Summary: viscii codec support
Author: Henry Jones
Author-email: Henry Jones <henryivesjones@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# 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, 3.14

# Installation
The `viscii-codec` package is available on [pypi](https://pypi.org/project/viscii-codec/) 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:
```python
# 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:
```python
>>> 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](https://datatracker.ietf.org/doc/html/rfc1456) and cross referenced with the [vietstd report of September 1992](https://vietstd.sourceforge.net/report/rep92.htm#page30).
