Unicad is short for Universal Charset Auto Detector. It is an Emacs-Lisp port of Mozilla Universal Charset Detector.

Unicad project is hosted on Google Code: http://code.google.com/p/unicad/.


What can Unicad do?

Unicad helps Emacs to guess the correct coding system when opening a file.

What languages and coding systems does Unicad support?

Will there be support for iso-8859-9 (latin-5, Turkish) encoding?

I haven’t considered Turkish. I would put it to TODO list. But I think latin-1, latin-2 and latin-5 are too similar to distinguish. It’ll be very hard. I hope someone can help. – Qichen

Who should use Unicad?

  1. Emacs Users. Unicad is an Emacs extension that written in Elisp. It is designed and works for Emacs.
  2. Multilanguage Users. If you are English only speakers, then there is no need to install Unicad on Emacs. Otherwise, if you need to read and edit files in multiple language and use different coding systems, Unicad will definitely help you in recognizing coding systems.
  3. Anyone who is tired of struggling with garbled text. Normal Text Editors are not so intelligent to choose correct coding system among various and complicated charsets. I suggest you try the most powerful text editor ever in the world - Emacs and Unicad.

How to use Unicad?

Download the latest unicad.el, copy it to your Emacs load path (e.g. site-lisp directory), and add the following line to your ~/.emacs:

    (require 'unicad)

You may byte compile this file to speed up the charset detecting process.

What's the difference between Unicad and Mozilla Universal Charset Detector?

What's the benefit of Unicad over Emacs Mule?

Emacs already comes with a heuristic to determine the encoding of files opened. This heuristic is influenced by the list of preferred coding systems, which in turn is determined by the locale (and users calling ‘prefer-coding-system’ in their init file).

However, if your locale is e.g. Chinese or ‘prefer-coding-system’ includes chinese-iso-8bit, and you open a source code written by a German, you’ll find Emacs has chosen the wrong coding system in most of cases. In this case, Mule is actually not for real Multilingual environment but for multiple single lingual environment.

On the other hand, Unicad can “guess” the coding system based on charset distribution tables provided by Mozilla Universal Charset Detector, that are sampled from many mega-byte text materials. The detection accuracy is well proven in Mozilla Firefox. Unicad.el is trying to bring this ability into Emacs for real multilingual users, especially who uses multibyte coding systems.