Metadata-Version: 2.4
Name: viscii-codec
Version: 1.0.1
Summary: viscii codec support
Keywords: viscii,codec,unicode
Author: Henry Jones
Author-email: Henry Jones <henryivesjones@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Project-URL: Repository, https://github.com/henryivesjones/viscii.git
Project-URL: Issues, https://github.com/henryivesjones/viscii/issues
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, and 3.14. It may work on other versions but they have not been tested.

# 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).


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

OK
```
