| 1 | """ Unicode Mapping Parser and Codec Generator.
|
|---|
| 2 |
|
|---|
| 3 | This script parses Unicode mapping files as available from the Unicode
|
|---|
| 4 | site (ftp://ftp.unicode.org/Public/MAPPINGS/) and creates Python codec
|
|---|
| 5 | modules from them. The codecs use the standard character mapping codec
|
|---|
| 6 | to actually apply the mapping.
|
|---|
| 7 |
|
|---|
| 8 | Synopsis: gencodec.py dir codec_prefix
|
|---|
| 9 |
|
|---|
| 10 | All files in dir are scanned and those producing non-empty mappings
|
|---|
| 11 | will be written to <codec_prefix><mapname>.py with <mapname> being the
|
|---|
| 12 | first part of the map's filename ('a' in a.b.c.txt) converted to
|
|---|
| 13 | lowercase with hyphens replaced by underscores.
|
|---|
| 14 |
|
|---|
| 15 | The tool also writes marshalled versions of the mapping tables to the
|
|---|
| 16 | same location (with .mapping extension).
|
|---|
| 17 |
|
|---|
| 18 | Written by Marc-Andre Lemburg ([email protected]).
|
|---|
| 19 |
|
|---|
|
|---|