! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
RTL support in terminal (BiDi)
Status:
RESOLVED: WONTFIX
Product:
Xfce4-terminal
Component:
General

Comments

Description Tal 2016-05-12 16:23:26 CEST
A similar issue is with gnome terminal:
https://www.mail-archive.com/desktop-packages@lists.launchpad.net/msg439645.html

I can't describe it better, but I will try.

RTL(right to left) languages(e.g. Hebrew, Arabic) are written from right to left, oppositely from major languages.

In the terminal, the characters are always displayed from left to right, not matter what is the language. So while this is the correct one (the example from the link above):
(right to left)
ا ب ج
ש ל ו ם

You see:
(left to right)
ج ب ا
ם ו ל ש

In numbers:
RTL: 321
LTR: 123

Almost all browsers and text editor fixed this, but sadly terminals didn't(except KDE).

The solution in the code is to detect a sequences of characters with invert direction(usually RTL) from the current displayed direction(usually LTR) and show them inversely. This is called bidirectional display(BiDi).

If you want to experience with the bidirectional effect, copy(WITHOUT SPACE) the Arabic or the Hebrew text I posted above to BiDi compatible text editor(such as gedit).

Notice that all characters is one and only one of:
1. RTL languages
2. LTR languages
3. neutral(such as space[' ']) characters. In this case, direction is the already currently displayed direction.

What do you think?
Comment 1 Egmont Koblinger 2016-05-18 21:25:09 CEST
xfce-terminal's terminal emulation is done by the VTE widget (actually a terribly old unmaintained version thereof, see bug 11207, but most recent VTEs still don't support BiDi).

There's no way xfce-terminal could modify VTE's behavior and introduce changes on top of that. That is, the only place where this issue could be fixed, is VTE, and not xfce-terminal. (Of course, xfce-terminal would need to port to the newest VTE.)

The VTE bugreport, pointing out a couple of issues that make this story way more complicated than you might think (and why konsole's implementation is, by design, very far from perfect) is at https://bugzilla.gnome.org/show_bug.cgi?id=321490.
Comment 2 Tal 2016-05-27 16:27:17 CEST
(In reply to Egmont Koblinger from comment #1)
> xfce-terminal's terminal emulation is done by the VTE widget (actually a
> terribly old unmaintained version thereof, see bug 11207, but most recent
> VTEs still don't support BiDi).
> 
> There's no way xfce-terminal could modify VTE's behavior and introduce
> changes on top of that. That is, the only place where this issue could be
> fixed, is VTE, and not xfce-terminal. (Of course, xfce-terminal would need
> to port to the newest VTE.)
> 
> The VTE bugreport, pointing out a couple of issues that make this story way
> more complicated than you might think (and why konsole's implementation is,
> by design, very far from perfect) is at
> https://bugzilla.gnome.org/show_bug.cgi?id=321490.

Thanks.

Is it possible to tell Xfce terminal to "pipe" everything to bidiv? This may solve this bug.
Comment 3 Egmont Koblinger 2016-05-27 16:42:45 CEST
This might solve a few issues, but would definitely create a whole lot more.

Trust us, if it was so simple to do BiDi in terminals, we (vte developers) would have done it a long time ago. This includes former vte developer Behdad whose native language is an RTL one, and me who have spent half a year solely on RTLizing a very complex homepage.

It's a much more complicated story than you think.

Following the link that you posted and then another link, at https://bugs.launchpad.net/ubuntu/+source/vte/+bug/263822 Diego summarizes it:

"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."
Comment 4 Tal 2016-05-27 17:40:40 CEST
(In reply to Egmont Koblinger from comment #3)
> This might solve a few issues, but would definitely create a whole lot more.
> 
> Trust us, if it was so simple to do BiDi in terminals, we (vte developers)
> would have done it a long time ago. This includes former vte developer
> Behdad whose native language is an RTL one, and me who have spent half a
> year solely on RTLizing a very complex homepage.
> 
> It's a much more complicated story than you think.
> 
> Following the link that you posted and then another link, at
> https://bugs.launchpad.net/ubuntu/+source/vte/+bug/263822 Diego summarizes
> it:
> 
> "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."

Thanks

Bug #12576

Reported by:
Tal
Reported on: 2016-05-12
Last modified on: 2016-05-27

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information