-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Xnedit nicely supports UTF-8 characters, but does not support correct right to left rendering.
Some other text editors like "kate" decide based on first character, and then they render the line left to right or right to left.
See an example of two line text in Persian:
من هر روز از Xnedit استفاده می کنم.
Xnedit بهترین است!
First line is rendered correctly on the web and in kate, second line has Persian text mirrored.
Xnedit has all text mirrored. The text in google translate on the right is rendered correctly in the browser.

First step would be to add right to left rendering on per/line basis, same as in "kate" editor.
Final solution would be to support proper bidi rendering, by using right to left and left to right unprintable UTF-8 markers.
https://en.wikipedia.org/wiki/Right-to-left_mark
https://en.wikipedia.org/wiki/Left-to-right_mark
For text without the markers, some heuristics must still be used, and it will inevitably fail in some cases.