src/enca.c
). It's
single-threaded and uses one language and one analyser all the time.
Provided each thread has its own analyser, libenca should be thread-safe
(untested).ENCA
, Enca
, enca
, _ENCA
, _Enca
, and
_enca
as reserved.PKG_CHECK_MODULES
to check for libenca
in your configure scripts(optional steps are marked [optional]):
iconvcap.c
:iconvcap.c
for some documentation how it works.tools/encodings.dat
:@ICONV_NAME_<name>@
(as it will appear in iconvcap output) for
iconv names.tools/iconvenc.null
:Specifically, for regular 8bit (language dependent) charsets:
lib/unicodemap.c
:unicode_map_...[]
.UNICODE_MAP[]
entry.lib/filters.c
: [optional]lib/lang_??.c
:data/maps/??.map
:Specifically, for multibyte encodings:
lib/multibyte.c
:ENCA_MULTIBYTE_TESTS_ASCII[]
, ENCA_MULTIBYTE_TESTS_8BIT[]
,
ENCA_MULTIBYTE_TESTS_BINARY[]
.lib/enca.h
EncaSurface enum
, to
lib/encnames.c
SURFACE_INFO[]
a detection method must be added to
lib/guess.c
and now the most complicated part: this new method must be used
in the right places in lib/guess.c
make_guess()
.lib/lang_....c
files by copying some existing (use locale
code for names)filters.c
too). You can do it manually, but look how it's done for
existing languages in data/*
and read data/README
. lib/internal.h
:ENCA_LANGUAGE_....
src/lang.c
:LANGUAGE_LIST[]
entry pointing to the ENCA_LANGUAGE_....
If you run ./autogen.sh
and it finishes OK, you are lucky and can expect
things to work.
You have to give --enable-maintainer-mode
to ./configure
(or ./autogen
)
to build dists and/or the strange stuff in tools/
, data/
, tests/
, and
devel-docs/
.
The git repository is located at GitHub:
http://github.com/nijel/enca
There is also continuous integration on Travis:
https://travis-ci.org/nijel/enca