enca  1.19
About: enca (Extremely Naive Charset Analyser) detects character set and encoding of text files and can also convert them to other encodings.
  Fossies Dox: enca-1.19.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

enca Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies enca-1.19.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).

Enca - guess and convert encoding of text files

build status codecov.io Coverity Scan Build Status Coverage Status

Copyright (C) 2000-2003 David Necas (Yeti) yeti@physics.muni.cz

Copyright (C) 2009-2016 Michal Cihar michal@cihar.com


Enca (Extremely Naive Charset Analyser) consists of two main components:

  • libenca, an encoding detection library. It currently supports Belarusian, Bulgarian, Croatian, Czech, Estonian, Hungarian, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, Ukrainian, Chinese, and some multibyte encodings independently on language. The API should be relatively stable (to be read as `it will either change only marginally, or very drastically').

  • enca, a command line frontend, integrating libenca and several charset conversion libraries and tools (GNU recode, UNIX98 iconv, perl Unicode::Map, cstocs).


Enca should compile and work on every POSIX.1 compliant system with ISO C compiler, and actually compiles on many noncompliant systems too (see below for list dependencies). If you have some of following additional tools, Enca can use them as external converters:

  • GNU recode and the associated recoding library
  • Perl charset converters Unicode::Map8 or Unicode::Map
  • cstocs, the famous Czech charset converter

Optional features:

  • Compilation of GNU recode library interface is controlled by --with-librecode[=DIR], --without-librecode configure parameters. It is compiled in by default when found. Optionally, you can specify a DIR; librecode include files will be then searched in DIR/include and the library itself in DIR/lib.

  • Compilation of UNIX98 iconv interface is controlled by --with-libiconv=[DIR], --without-libiconv configure parameters. It is compiled in by default when found and considered usable. Optionally, you can specify a DIR; libiconv include files will be then searched in DIR/include and the library itself in DIR/lib.

  • Compilation of interface to external converter programs is controlled by --enable-external, --disable-external configure parameters. By default is is compiled in.

Don't even try to compile Enca on system not supporting following ISO C and POSIX features:

  • Function prototypes.
  • Basic ISO C headers and functions declared there:
    • assert.h, ctype.h, math.h, stdarg.h, stdio.h, stdlib.h
    • any (working) one of string.h, strings.h, memory.h
    • unistd.h, sys/stat.h, sys/types.h

For the impatient: Run

make check
make install

as usual.


Enca can be copied and/or modified under the terms of version 2 of GNU General Public License. Please see COPYING for details.

Web resources

Enca can be found at http://github.com/nijel/enca/, you can download tarballs from http://dl.cihar.com/enca/.


Report problems at https://github.com/nijel/enca/issues. Some known bugs have been collected in BUGS section of enca manual page.

Hacking (with) Enca

Please see TODO for list of things that should be fixed and features to be implemented and their priority and also for list of things that definitely shouldn't be implemented.

The file DEVELOP.md describes what needs to be done to add a new encoding or language to Enca.

The directory devel-docs/html contains Enca library API documentation in HTML form.