You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Database entries (there are two examples in the emoticons file as of this reply) which include bidirectional unicode text (Arabic, Persian, or Hebrew) are rendered in their entirety by Rofi from right-to-left.
I experimented a bit and including e.g. \u200e the left-to-right "implicit directional mark" at the head of the lines including bidi text does indeed make Rofi render them ltr, BUT then barring any code changes the result in either the clipboard or by type includes these control characters. Depending on where you paste this, it could show the character and make things ugly.
So we have a solution of sorts. We could..
Prepend directional marks on bidi lines in the database, and strip them on the output
This means the addition of a new field to the db format, but just a single extra string substitution at runtime, which isn't a lot of overhead.
Prepend directional marks on all lines in-line as they are piped out to rofi, and then strip them on output
This means a text prepend operation of every line that goes out to rofi, which feels gross, but at least wouldn't alter the DB format.
Do nothing
This means some lines will continue to be reversed in the menu
I'm leaning towards "Do nothing" but will continue to consider the other options
The text was updated successfully, but these errors were encountered:
What about prepending directional marks on the bidi lines, and just substituting "\u200e" with "" on output? Should be solved by a simple substitution like ${string//\u200e/}, no?
There's no need to add a new field in this case, so this seems like a very simple yet effective solution.
As per issue #17 and PR #18
Database entries (there are two examples in the emoticons file as of this reply) which include bidirectional unicode text (Arabic, Persian, or Hebrew) are rendered in their entirety by Rofi from right-to-left.
I experimented a bit and including e.g. \u200e the left-to-right "implicit directional mark" at the head of the lines including bidi text does indeed make Rofi render them ltr, BUT then barring any code changes the result in either the clipboard or by
type
includes these control characters. Depending on where you paste this, it could show the character and make things ugly.So we have a solution of sorts. We could..
I'm leaning towards "Do nothing" but will continue to consider the other options
The text was updated successfully, but these errors were encountered: