[PATCH 0/1] iconvdata: Add ABICOMP and BRASCII character sets
Elvis Pfutzenreuter
epxx@epxx.co
Thu Nov 19 11:59:17 GMT 2026
Hi,
This patch adds two Brazilian 8-bit character sets to iconv: ABICOMP
and BRASCII. They were used by printers, terminals and microcomputers
made in Brazil in the 1980s (Elebra, Itautec, Scopus and others), and
files in these encodings still turn up in archives, old printer
spools and emulators. As far as I know, no other converter in glibc
handles them.
* ABICOMP was defined by the Brazilian computer industry association
(Associação Brasileira da Indústria de Computadores e Periféricos).
It is ASCII plus 64 characters in 0xA0..0xDF (Portuguese and other
Western European accented letters, Œ/œ/Ÿ and a few symbols). The
ranges 0x80..0x9F and 0xE0..0xFF are undefined.
Aliases: ABICOMP-BR, CP-ABICOMP.
* BRASCII is ABNT NBR 9614:1986 (revised as NBR 9611:1991), also known
as code page 3847 on Star printers. It is ISO-8859-1 as in the early
drafts of that standard: 0xD7 is U+0152 (Œ) and 0xF7 is U+0153 (œ)
instead of × and ÷. The range 0x80..0x9F is undefined.
Alias: CP3847.
The implementation adds no new conversion code. Both charsets are
gen-8bit-gap modules (HAS_HOLES = 1) whose tables are generated from
new files in localedata/charmaps, following the CP770..CP774 and
HP-ROMAN9 modules. The patch also:
- registers the modules and aliases in gconv-modules-extra.conf,
- adds both charsets to tst-tables.sh and to TESTS, with testdata
files covering every defined code point,
- adds a NEWS entry.
The tables come from an out-of-tree gconv module I have maintained
for these charsets (https://github.com/elvis-epx/gconv-abicomp). The
testdata files were cross-checked against that module.
Testing: configured with default options (-Werror enabled) on
x86_64-linux-gnu (Ubuntu 24.04, GCC 13.3), built in a separate build
directory, and ran "make check subdirs=iconvdata": 34 PASS, 0 FAIL.
For both new charsets, iconv-test covers testdata round trips, the
suntzu ASCII round trip, conversion through the charmaps, and the
decoder test. tst-tables compares all 192 (ABICOMP) and 224
(BRASCII) mappings in both directions.
Open questions for reviewers:
1. 0x80..0x9F are left undefined, as in the sources I have, rather
than mapped to the C1 controls U+0080..U+009F as many glibc
charmaps do. I am happy to map them if that is preferred.
2. Neither name is registered with IANA. ABICOMP-BR, CP-ABICOMP and
CP3847 are the aliases I have seen in use. Suggestions for
other names are welcome.
3. I signed off under the DCO and used "Copyright The GNU Toolchain
Authors." in the new source files.
Elvis Pfutzenreuter (1):
iconvdata: Add ABICOMP and BRASCII character sets
NEWS | 6 +
iconvdata/Makefile | 5 +-
iconvdata/TESTS | 2 +
iconvdata/abicomp.c | 27 ++++
iconvdata/brascii.c | 27 ++++
iconvdata/gconv-modules-extra.conf | 11 ++
iconvdata/testdata/ABICOMP | 10 ++
iconvdata/testdata/ABICOMP..UTF8 | 10 ++
iconvdata/testdata/BRASCII | 12 ++
iconvdata/testdata/BRASCII..UTF8 | 12 ++
iconvdata/tst-tables.sh | 2 +
localedata/charmaps/ABICOMP | 205 +++++++++++++++++++++++++
localedata/charmaps/BRASCII | 236 +++++++++++++++++++++++++++++
13 files changed, 563 insertions(+), 2 deletions(-)
create mode 100644 iconvdata/abicomp.c
create mode 100644 iconvdata/brascii.c
create mode 100644 iconvdata/testdata/ABICOMP
create mode 100644 iconvdata/testdata/ABICOMP..UTF8
create mode 100644 iconvdata/testdata/BRASCII
create mode 100644 iconvdata/testdata/BRASCII..UTF8
create mode 100644 localedata/charmaps/ABICOMP
create mode 100644 localedata/charmaps/BRASCII
--
2.43.0
More information about the Libc-alpha
mailing list