Support right-to-left languages
gyscos opened this issue · 6 comments
Some languages like Japanese and Chinese can write right-to-left (and/or top to bottom), but are fine with the usual left-to-right orientation.
Other languages like Arabic simply must be written right-to-left (I think?), so we may need some support for those.
Low priority for now, as I know next to nothing about how RTL languages are usually used on terminals.
hello
I am native Arabic speaker if you need any help just ask me its my pleasure
Thanks!
Here are a few questions:
- What terminal are you using? (Very interesting if someone using linux answers that.) Do you need to do anything to enable right-to-left support?
- Is the command prompt itself right-to-left? Or individual words, for instance
$ cd ARABIC_FOLDER
, does the folder name itself write right-to-left? - With a monospace font (in the terminal), are all characters 1-cell wide (like latin alphabet), or are some 2-cells wide (like some asian alphabets)?
sorry for the delay
What terminal are you using?
I am user for Linux Fedora and macOs
i use default terminal i can write arabic language at terminal in easy way
Do you need to do anything to enable right-to-left support?
No
Is the command prompt itself right-to-left? Or individual words, for instance $ cd ARABIC_FOLDER, does the folder name itself write right-to-left?
it shows like we read it like cd ملفاتي not like wrong way from left to right (ي ت ا ف ل م) or (م ل ف ا ت ي) all are wrong but (ملفاتي) is correct from RTL and not separated letters
With a monospace font (in the terminal), are all characters 1-cell wide (like latin alphabet), or are some 2-cells wide (like some asian alphabets)?
i dnt know how do i know?
Hmm interesting...
I am testing using gnome-terminal and konsole here.
-
In konsole, it looks like it prints the name properly:
However, attempting to move the cursor and edit in the middle of the word causes some mess:
Running vim gives a slightly different result:
Running theedit
example from cursive has the same result:
Where editing the middle of the words apparently splits it in two:
It seems to be printing ok:
-
In gnome-terminal, it's not as good:
It doesn't split the word weirdly when I edit in the middle, mainly because it just always write it left-to-right.
So it's clear already that some terminals have really bad support (gnome-terminal), some have some support (Konsole). In both situation, cursive behaves mostly like vim.
EDIT: Actually, the "split in two" resulting from editing in the middle on Konsole is indeed cursive's fault. I'll see how this can be improved.
hello again
i used mac os with edit example and here is the results
the first image it should be in the right side not left side and the shape for the word is perfect
the second one we have edited the word from the center(by removing ف letter) and the result is not good for the dialog
the third one we have edited the word from the center(by removing ل letter) and the result is good for the dialog its strange problem
Hi
Now GNOME Terminal has great support for RTL languages because of VTE. And also every Terminal emulators that use VTE. The only problem that I seen, is when the Bidi is active (is not active by default and can be active by printf "\e[?2501h"
command):
The first problem is the reversed shadow. The second is reversed arrows. when I press left arow
, It goes right and the same for right arow
.