Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip/Replace Unicode control characters (such as right-to-left) from file names (during rendering) #871

Open
yegor-mialyk opened this issue Aug 31, 2024 · 1 comment

Comments

@yegor-mialyk
Copy link
Contributor

Description of the new feature or improvement

Strip/Replace Unicode control characters (such as right-to-left) from file names (technically any string) during rendering:

Abbreviation Name Description
LRE U+202A LEFT-TO-RIGHT EMBEDDING Try treating following text as left-to-right.
RLE U+202B RIGHT-TO-LEFT EMBEDDING Try treating following text as right-to-left.
LRO U+202D LEFT-TO-RIGHT OVERRIDE Force treating following text as left-to-right.
RLO U+202E RIGHT-TO-LEFT OVERRIDE Force treating following text as right-to-left.
LRI U+2066 ⁦ LEFT-TO-RIGHT ISOLATE Force treating following text as left-to-right without affecting adjacent text.
RLI U+2067 ⁧ RIGHT-TO-LEFT ISOLATE Force treating following text as right-to-left without affecting adjacent text.
FSI U+2068 ⁨ FIRST STRONG ISOLATE Force treating following text in direction indicated by the next character.
PDF U+202C POP DIRECTIONAL FORMATTING Terminate nearest LRE, RLE, LRO, or RLO.
PDI U+2069 ⁩ POP DIRECTIONAL ISOLATE Terminate nearest LRI or RLI.
... ... ...

A sample file name:

[U+202E]test.txt

Rendered in Far Manager:

image

In Windows Terminal:

image

Proposed technical implementation details (optional)

No response

@yegor-mialyk yegor-mialyk changed the title Strip/Replace Unicode control characters (such as right-to-left) from file names Strip/Replace Unicode control characters (such as right-to-left) from file names (during rendering) Aug 31, 2024
@HamRusTal
Copy link
Contributor

HamRusTal commented Aug 31, 2024

I suggest that FAR users from Israel (e.g. @shmuz, @trexinc) review the resulting functionality first with regard to Hebrew.

(technically any string)

Also, I'd like to know how the change will affect rendering of e.g. descriptions (assuming text editor and viewer are not affected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants