Enchant

by Dom Lachowicz

Current maintainer: Reuben Thomas


Releases

What is Enchant?

Enchant is a library (and command-line program) that wraps a number of different spelling libraries and programs with a consistent interface. By using Enchant, you can use a wide range of spelling libraries, including some specialised for particular languages, without needing to program to each library's interface. If it's not convenient to call a C library, you can access most of Enchant's functionality via the enchant program, which communicates over a pipe, like Ispell, and is indeed Ispell-compatible.

Backends

Enchant is capable of having multiple backends loaded at once. Currently, Enchant has the following backends:

Getting Enchant

You can get Enchant from GitHub.

Older versions are still available from the AbiSource website.

User configuration

See enchant(5).

Command-line programs

Enchant comes with a couple of command-line utilities:
enchant-lsmod(1)
Gives information about the available dictionaries.
enchant(1)
Check the spelling of some text. This program is compatible with the ispell utility, but is for non-interactive use only.

Programs using Enchant

Enchant is used by GNU Emacs (as of version 27.1), AbiWord, LyX, and, via gspell and GtkSpell, a number of Gtk and GNOME applications.

Backends for additional spell-checking systems are welcomed.

Compatibility and bindings

Enchant is written in plain C99 and C++11, and should therefore work on most modern operating systems; other than the standard libraries, it requires only GLib. The build system uses GNU Autotools, and therefore works with most compilers, including Microsoft Visual C and XCode.

Bindings are available to many other languages:

All inputs and outputs are in UTF-8 encoding. Language tags use the familiar ISO standards, and take the form of "xx_YY" (language_LOCALE), where the locale ("_YY") portion is optional, but encouraged.

Bugs and development

Please use Github issue tracker if possible to file bugs, offer patches or request new features. Even better, submit a Pull Request! Alternatively, feel free to send a message to the abiword-devel mailing list.

Enchant is quite mature, but it still lacks features. Some work has already been done as part of past Google Summer of Code projects that has not yet been integrated into releases (see the issue tracker). Some functionality available in the underlying spelling libraries but not yet supported by Enchant could also usefully be added to Enchant's APIs.

If you'd like to contribute to Enchant, please read the file HACKING.

License

Enchant is licensed under the LGPL license, with an exception so that non-free plugin backends can be loaded and used by Enchant. Thus, it is possible to use the native spell checkers on proprietary platforms (macOS, MS Office, …).

What's in a Name?

The definition of "Enchant" is roughly "to cast a spell". So, it's a pun!