Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BiDirectional text support #1133

Open
XVilka opened this issue Oct 12, 2019 · 4 comments
Open

BiDirectional text support #1133

XVilka opened this issue Oct 12, 2019 · 4 comments

Comments

@XVilka
Copy link

XVilka commented Oct 12, 2019

In the modern world, the support for some languages that are right-to-left and mixing them with left-to-write words and numbers is crucial for a different software. At some point, this should be supported everywhere, including the console.

I started to gather the information about BiDi support in various console terminals (and programs) in analogy with true color crusade at https://gist.github.com/XVilka/a0e49e1c65370ba11c17

New console BiDi specification was recently implemented in libvte by @egmontkob: https://terminal-wg.pages.freedesktop.org/bidi/implementations.html#vte

Note, that with the release of GNOME 3.34 the support of BiDi is available in Gnome Terminal out of the box, which makes testing/implementing it in the other programs, such as irssi way easier.

@dequis
Copy link
Member

dequis commented Oct 12, 2019

Well damn this is a lot. What parts are relevant to us? Do we have to, say, detect rtl scripts using unicode properties and send appropriate escape sequences? Add support for inserting those markers manually in our theming/formatting code?

@egmontkob
Copy link

Fullscreen apps such as irssi can not rely on the terminal emulator doing BiDi. Its only chance is to do BiDi reordering itself.

The only relevant part for you is to emit the escape sequences that turn off gnome-terminal's BiDi reordering, thus reverting to its previous behavior (and the behavior of any non-BiDi-aware terminal).

@ailin-nemui
Copy link
Contributor

isn't there any shortcut? I believe I had some users report success for rtl chatting in the past, before these issues were fixed (possibly using mlterm)

@egmontkob
Copy link

Sure, mlterm, and newest gnome-terminal automatically flip RTL text, which gives a kind of usable experience. At least the words are readable. But if you go into anything more complex, like a mixture of scripts within a multi-line message, chances are it'll fall apart. Proper BiDi is only doable by the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants