CodecMapper derives mapping files from Java Charsets which can be processed by Python's gencodec.py.
To build and run CodecMapper, you need:
- Java 1.7 or later
- ant 1.8 or later, available from https://ant.apache.org/.
It might also work with earlier versions of ant but this has not been tested.
To build CodecMapper, run:
$ ant dist
To generate a mapping file for a specific codec, run for example:
$ java -jar dist/CodecMapper.jar iso-8859-15
The resulting mapping file is stored in iso-8859-15.txt
. The generated mapping files
are located in the same folder and have names like
iso-8859.15.mapping
.
As an example usage, CodecMapper can provide additional EBCDIC codecs for Python, which can easily be packaged and distributed.
To test the Python codecs you need to setup a Pythen venv:
$ python -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install pycodestyle wheel
After that you can build the Python codecs and run the tests:
$ ant test
For more information, browse the "ebcdic" folder of this distribution and take a look at the README.rst.
See https://github.com/roskakori/CodecMapper.
Copyright (c) 2013 - 2019, Thomas Aglassinger All rights reserved.
Distributed under the BSD license, see LICENSE.txt for more information.