Skip to content

Right to left language text is rendered incorrectly. #131

@dpeterc

Description

@dpeterc

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.
PersianNedit
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions