[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[developers] Fwd: [Bug 263822] Re: RTL (right to left) support in terminal (BiDi)



Any one can respond to this recent comment?

-------- Forwarded Message --------
Subject: [Bug 263822] Re: RTL (right to left) support in terminal (BiDi)
Date: Sat, 13 Feb 2016 21:06:56 -0000
From: Diego Iastrubni <263822 at bugs dot launchpad dot net>
Reply-To: Bug 263822 <263822 at bugs dot launchpad dot net>
To: uahello at gmail dot com

Usama,

The reason for bug #1537064 is me nagging Yaron. The problem of BiDi
cannot be solved in a terminal vt100 environment. The reason - is that
the application does not  telling the VTE the boundaries of the
paragraph.

Imagine "mc" opeenning a dialog to rename a file. Lets check the
options;

1) A line contains  RTL - apply BiDi to it and display line in RTL.
Funny things will happen, as the line bellow will also be reverted. The
file name of the right panel - will be on the left.
2) Even funnier - when you type lam and aliph - those will be displayed
as a single glyph on screen and the app counted two unicode chars (4
bytes in UTF8) and now the left margin is off by one (the frames of the
dialog are also text, remember - the app needs to pad spaces until the
"|" char will be displayed).
3) OK  - instead of reverting a whole line - lets revers each word -
this is broken since you now have proper words in LTR order (lets ignore #2)
4) OK - lets detect the word boundary and de-order "n" words - when
happens when the first word of the next paragraph starts with an english
word? the direction will be broken.

I assume we can find other problems. Lets find solutions:
1) Do the BiDi in apps, while assuming the ternimal is dumb: OK, it will
work on xterm, konsole, gnome-terminal, and VT. Problem - we need to fix
*ALL* terminal apps.
2) Do the BiDi in terminals - in order to fix all above problems, we
need a way to report to the terminal about the regions that will contain
text that he may modify. Then code a reference implementation, issue an
RFC and port to all other terminals.

TL.DR.  Ternimals are broken by design and cannot support RTL/BIDI. Just
move on and use X11/Wayland for Arabic/Farsi/Hebrew/Whatever and don't
translate those interfaces to the native languages on terminals.

-- 
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/263822

Title:
  RTL (right to left) support in terminal (BiDi)

To manage notifications about this bug go to:
https://bugs.launchpad.net/vte/+bug/263822/+subscriptions