|
Packit Service |
366393 |
# Enca - guess and convert encoding of text files
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
[![build status](https://secure.travis-ci.org/nijel/enca.png)](https://travis-ci.org/nijel/enca)
|
|
Packit Service |
366393 |
[![codecov.io](https://codecov.io/github/nijel/enca/coverage.svg?branch=master)](https://codecov.io/github/nijel/enca?branch=master)
|
|
Packit Service |
366393 |
[![Coverity Scan Build Status](https://scan.coverity.com/projects/3292/badge.svg)](https://scan.coverity.com/projects/nijel-enca)
|
|
Packit Service |
366393 |
[![Coverage Status](https://coveralls.io/repos/nijel/enca/badge.png?branch=master)](https://coveralls.io/r/nijel/enca?branch=master)
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## Copyright
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Copyright (C) 2000-2003 David Necas (Yeti) <yeti@physics.muni.cz>
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Copyright (C) 2009-2016 Michal Cihar <michal@cihar.com>
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## Description
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Enca (Extremely Naive Charset Analyser) consists of two main components:
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
* libenca, an encoding detection library. It currently supports
|
|
Packit Service |
366393 |
Belarusian, Bulgarian, Croatian, Czech, Estonian, Hungarian, Latvian,
|
|
Packit Service |
366393 |
Lithuanian, Polish, Russian, Slovak, Slovene, Ukrainian, Chinese, and
|
|
Packit Service |
366393 |
some multibyte encodings independently on language. The API should be
|
|
Packit Service |
366393 |
relatively stable (to be read as `it will either change only
|
|
Packit Service |
366393 |
marginally, or very drastically').
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
* enca, a command line frontend, integrating libenca and several
|
|
Packit Service |
366393 |
charset conversion libraries and tools (GNU recode, UNIX98 iconv,
|
|
Packit Service |
366393 |
perl Unicode::Map, cstocs).
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## Installation
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Enca should compile and work on every POSIX.1 compliant system with ISO C
|
|
Packit Service |
366393 |
compiler, and actually compiles on many noncompliant systems too (see below
|
|
Packit Service |
366393 |
for list dependencies). If you have some of following additional tools,
|
|
Packit Service |
366393 |
Enca can use them as external converters:
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
* GNU recode and the associated recoding library
|
|
Packit Service |
366393 |
* Perl charset converters Unicode::Map8 or Unicode::Map
|
|
Packit Service |
366393 |
* cstocs, the famous Czech charset converter
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Optional features:
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
* Compilation of GNU recode library interface is controlled by
|
|
Packit Service |
366393 |
`--with-librecode[=DIR]`, `--without-librecode`
|
|
Packit Service |
366393 |
configure parameters. It is compiled in by default when found.
|
|
Packit Service |
366393 |
Optionally, you can specify a DIR; librecode include files will be
|
|
Packit Service |
366393 |
then searched in DIR/include and the library itself in DIR/lib.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
* Compilation of UNIX98 iconv interface is controlled by
|
|
Packit Service |
366393 |
`--with-libiconv=[DIR]`, `--without-libiconv`
|
|
Packit Service |
366393 |
configure parameters. It is compiled in by default when found
|
|
Packit Service |
366393 |
and considered usable. Optionally, you can specify a DIR; libiconv
|
|
Packit Service |
366393 |
include files will be then searched in DIR/include and the library
|
|
Packit Service |
366393 |
itself in DIR/lib.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
* Compilation of interface to external converter programs is controlled by
|
|
Packit Service |
366393 |
`--enable-external`, `--disable-external`
|
|
Packit Service |
366393 |
configure parameters. By default is is compiled in.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Don't even try to compile Enca on system not supporting following ISO C and
|
|
Packit Service |
366393 |
POSIX features:
|
|
Packit Service |
366393 |
* Function prototypes.
|
|
Packit Service |
366393 |
* Basic ISO C headers and functions declared there:
|
|
Packit Service |
366393 |
- assert.h, ctype.h, math.h, stdarg.h, stdio.h, stdlib.h
|
|
Packit Service |
366393 |
- any (working) one of string.h, strings.h, memory.h
|
|
Packit Service |
366393 |
- unistd.h, sys/stat.h, sys/types.h
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
For the impatient: Run
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
./configure
|
|
Packit Service |
366393 |
make
|
|
Packit Service |
366393 |
make check
|
|
Packit Service |
366393 |
make install
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
as usual.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## License
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Enca can be copied and/or modified under the terms of version 2 of
|
|
Packit Service |
366393 |
GNU General Public License. Please see COPYING for details.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## Web resources
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Enca can be found at http://github.com/nijel/enca/, you can download
|
|
Packit Service |
366393 |
tarballs from http://dl.cihar.com/enca/.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## Bugs
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Report problems at <https://github.com/nijel/enca/issues>. Some known bugs have
|
|
Packit Service |
366393 |
been collected in BUGS section of enca manual page.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
## Hacking (with) Enca
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
Please see TODO for list of things that should be fixed and features to
|
|
Packit Service |
366393 |
be implemented and their priority and also for list of things that
|
|
Packit Service |
366393 |
definitely shouldn't be implemented.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
The file DEVELOP.md describes what needs to be done to add a new
|
|
Packit Service |
366393 |
encoding or language to Enca.
|
|
Packit Service |
366393 |
|
|
Packit Service |
366393 |
The directory devel-docs/html contains Enca library API documentation in
|
|
Packit Service |
366393 |
HTML form.
|