Hacker News new | ask | show | jobs
by java-man 972 days ago
Thank you for your response!

It looks like you are mostly dealing with the browser, right? Things might have changed since you wrote it in 2017: I see Chrome on macOS do the "right thing" when typing Arabic, the punctuation gets inserted to the left of Arabic. I am using codepen RTL TextArea example which has

   <div dir="rtl"><textarea /></div>
The browser seems to use "logical" navigation in this case, that is, if I place the caret in the middle of digits (1234567) and press RIGTH key the caret moves left.

Do you use any software specifically designed for Arabic market?

1 comments

Yeah browsers are much better at this but there's still a lot of places where it's problematic (e.g. Visual Studio Code, Sublime Text, etc.)

In terms of text editing no not really, most folks I know are either using Word, Pages, or Google Docs.

Usually the caret going the opposite direction is because of bidi characters. It would behave properly if you used Eastern Arabic / Indo-Arabic numerals, e.g. ١٢٣٤٥٦٧٨٩ because those count as RTL.

If you need to have on line that has both RTL, bidi, and LTR, that's when I find everything goes to hell no matter what software I am using.

Right. My goal is to find a good solution.

One possible solution is a dual, or split caret, with direction indicators [0]. So at least when the insertion position depends on the type of character being typed, one can see where it may go. What do you think of that?

And also, I didn't quite understand which kind of navigation (using LEFT and RIGHT arrow keys) you prefer or feel natural - the visual or "logical". The thing about logical one is that the caret might move in the opposite direction (relative to the arrow key pressed) when crossing bidi boundaries (browsers seem to use logical).

[0] https://user-images.githubusercontent.com/107069028/27779060...