Proposal for BiDi in terminal emulators

Eli Zaretskii via Unicode unicode at
Thu Jan 31 09:14:21 CST 2019

> From: Egmont Koblinger <egmont at>
> Date: Thu, 31 Jan 2019 10:41:02 +0100
> Cc: Frédéric Grosshans <frederic.grosshans at>, 
> 	unicode at
> > Personally, I think we should simply assume that complex script
> > shaping is left to the terminal, and if the terminal cannot do that,
> > then that's a restriction of working on a text terminal.
> I cannot read any of the Arabic, Syriac etc. scripts, but I did lots
> of experimenting with picking random Arabic words, displaying in the
> terminal their unshaped as well as shaped (using presentation form
> characters) variants, and compared them to pango-view's (harfbuzz's)
> rendering.
> To my eyes the version I got in the terminal with the presentation
> form characters matched the "expected" (pango-view) rendering
> extremely closely.

I suggest that you show the result to someone who does read Arabic.
Small changes can be very unpleasant to the eyes of an Arabic reader.

As for Arabic presentation forms, I already explained why they cannot
be considered a solution that is anywhere near the complete one.

> > OTOH a terminal emulator who wants to perform shaping needs
> > information from the application
> And the presentation form characters are pretty much exactly that
> information, aren't they (for Arabic)?

Much more is needed for correct shaping.

> Instead of saying that it's not possible, could we perpahs try to
> solve it, or at least substantially improve the situation? I mean, for
> example we can introduce control characters that specify the language.
> We can introduce a flag that tells the terminal whether to do shaping
> or not. There are probably plenty of more ideas to be thrown in for
> discussion and improvement.

You could do that, but it will require a lot of non-trivial processing
from the applications.  Text-mode applications don't want any complex
tinkering, they want just to write their text and be done.  The more
overhead you add to that simple task, the less probable it is that
applications will support such a terminal.

More information about the Unicode mailing list