Re: bidi support for xterm

From: Markus Kuhn (Markus.Kuhn@cl.cam.ac.uk)
Date: Sat Aug 14 1999 - 06:55:39 EDT


schererm@us.ibm.com wrote on 1999-08-13 22:58 UTC:
> there may be good news ahead for the bidi operations:
>
> our team at ibm is working on a c implementation of the updated bidi algorithm
> as it will go into the upcoming version 3.0 of unicode. this will be part of the
> IBM Classes for Unicode (icu), which is open source. the xterm team could then
> use this if it wanted to.
>
> see http://www.ibm.com/news/1999/06/181.phtml
> or http://www.ibm.com/alphaWorks

Thanks for the offer. There is also

  http://imagic.weizmann.ac.il/~dov/freesw/FriBidi/

However, mere implementations of the Unicode bidi algorithm are far from
what we need to really understand how to handle bidi text in xterm or
other VT100/ISO 6429 emulators. Xterm, like any VT100 emulator, is NOT
just a receiver of a stream of Unicode plaintext. It is a rendering
engine that places glyphs onto a character cell matrix, and the received
stream of Unicode characters is mixed with a huge number of different
control sequences for positioning the cursor, scrolling parts of the
screen, deleting parts of the screen, etc., whose semantics in the
context of the Unicode bidi algorithm are extremely unclear (at least to
me!). We have to worry about full-screen editors such as vi or mined
which interact with xterm in a very intimate way in order to provide
with the user an intuitive editing functionality. If I tell xterm to
position the cursor into some hebrew text and then send the
delete-end-of-line ESC sequence, is xterm supposed to delete to the left
or to the right? What should the backspace control code do on the screen
when it passes through mixed hebrew/latin text?

I think for xterm the higher priority projects should be biwidth fonts
(for CJK) and combining characters (for Thai, phonetic alphabet, etc.),
which seems to be of manageable complexity. I have no idea, how a
practical convention for the interaction of full-screen editors with
xterm whould look like, if xterm tried somehow to implement the Unicode
bidi algorithm, and I challenge anyone who urgently wants to have the
bidi algorithm in xterm to write up a detailed proposal that explains
how this should work precisely.

Are the ISO 6429 bidi mechanisms used anywhere and are they considered
to be of any use at all? I have my doubts. They are very different from
the Unicode bidi algorithm, so they will not help you to get a Unicode
text sent to xterm displayed directly. They allow you to put the
terminal into a general right-to-left mode, but that is not what we
really want to have in xterm, because under Unix, any Hebrew text is
most likely to be used always together with some Latin text, so a
Hebrew-only support would probably not be too helpful.

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:51 EDT