Wrong -> arrow direction in RTL text contexts

You don’t use a right-to-left script in everyday life, right? There is no bug in what you described. There is some ambiguity in what you said so to prevent confusion I will address the second part of your comment first.

This is exactly how it’s supposed to work. Think of it this way:

The character > literally means “greater than”. The string “A > B” means “A is greater than B”.

Similarly, to say “א is greater than ב” I would replace “is greater than” with the same greater-than character with the same code U+003E. However, because the string is entirely RTL, “א” appears to the right of “ב”. If the “greater than” character was rendered the same as LTR, it would show: א<ב which reads as “א is less than ב” or “ב is greater than א” - the exact opposite relationship to the one being described.

This is why when rendering the greater-than character, it gets visually flipped when in RTL. But the underlying character, and the Unicode data backing it, is still the “greater than” symbol. The string still means “א is greater than ב”.

Now back to your first question:

If you change your keyboard layout to a RTL language (like Hebrew or Arabic), then the key combination Shift+, (the key with < printed on it) would actually type the “greater than” character >. This would render as ‏>‏ in a RTL context, like in the search box you found.

[Edit: the next paragraph was written when I slightly misunderstood what you said you had tested. I thought you were typing into a RTL box with a LTR keyboard, when you were actually doing the opposite. Hopefully I still answered your confusion.]

But you are still using a Latin keyboard layout, so when you press that key combination, it inserts a “less than” character <. But it gets rendered as ‏<‏ because in RTL, it means what’s to the right is less than what’s to the left.

Bottom line: the character is the same, but its rendering gets mirrored.

If you’ve understood what I said up to this point, then you’ll understand that that would make -< or in RTL ‏-<‏ which I don’t expect is what you meant.

Did I successfully explain it or did I just make you more confused?

1 Like