This pages has links to reference material and will eventually explain the “bidi” machinery in the works for Emacs and XEmacs.
Emacs supports bidirectional display out of the box since version 24.1. Just type in text in a R2L script such as hebrew or arabic.
Neither Emacs 21 nor XEmacs 21 do bidi well at the moment. “bidi” refers to the input and output of bidirectional text. This is important when right-to-left scripts such as Arabic and Hebrew are mixed with left-to-right scripts such as European langauges.
There is a branch of Emacs 21 available for Arabic and Hebrew by the National Institute of Advanced Industrial Science and Technology (AIST)! It is based on the GNU Emacs-21.3.50 branch and available from here:
It is possible to actually get bidi work done under XEmacs 21.5; see
Requires a terminal emulator with support for bidi, for example PuTTY or mlterm(1). This is not a particularly satisfactory solution.
Poor-mans-bidi-mode takes a different - in-the-mean-time - approach: it an external program such as fribidi or bidiv to display the bidified text in a different buffer, relocating point by context, so that you know where you are; see
These links are recommended reading.
“Unified and Extensible Mechanism for Multilingual Text Processing” by KenichiHanda?, MikikoNishikimi?, SatoruTomura?, and NaotoTakahashi?, available in various translations, explains the MULE basics:
You can find more information on the Unicode homepage:
The most important Technical Report in this context is Report #9, also known as Unicode Standard Annex #9, or UAX#9, subtitled The Bidirectional Algorithm.
The bidi algorithm needs to know the bidi types for all categories. These can be extracted from one of the data files available from Unicode. See the UnicodeData.txt file at the following location for the bidi types, see the BidiMirroring.txt file for the mirroring of glyphs.