Sublime Forum

Weird Effect of a Unicode Character?

#1

I love Sublime Text, but due to my curiosity, I inserted the RTLO, or Right-to-Left Override, character, into Sublime Text, which causes the following to happen on some innocent text that is not on Sublime Text:

This is some test text.
(The text above should look backward.)

However, when you put this in Sublime Text, the text will not appear backwards. Furthermore, if you have an untitled tab on Sublime Text, and insert the RTLO character as the first character on the top line, the window title will become backwards. Also, if you have text after, but not before, the character, some space will appear to the left of the rest of the tab title. If the character is between the text, some space will appear between the two letters the character was inserted in the tab title, and the text after the character becomes backwards in the window title, including the " • - Sublime Text" part.

The point is…

What the heck is going on?!?!?! :confused:

In the editor, the RTLO character should make the text appear backward, and there shouldn’t be a huge space in the tab title!

Somebody, please explain this to me!

0 Likes

#2

Don’t know what’s happening under the hood but ST never supports RTL as I know.

0 Likes

#3

The ST text rendering engine doesn’t support RTL text, so it doesn’t render the text correctly. The OS (or perhaps some other text rendering library) on the other hand does, and that is used to render the tab title, so you get two different renderings.

1 Like

#4

Actually, I think there are three different renderings: the editor text, the tab title, and the window title. The only one that renders it correctly is the window title. The tab title acknowledges the character, while the editor text pretends nothing is there.

0 Likes