Notepads: [Bug] Pasting Arabic text may make it left-to-right
Describe the bug Right-to-Left scripts (Arabic, Hebrew, etc.) are not treated as RTL.
To Reproduce Type this string into Notepads:
العربية
This is the word “Arabic” in Arabic, contains 7 letters:
ا
Alif;ل
Lam;ع
Ayin;د
Ra;ب
Ba;ي
Ya;ة
Ta Marbutah.
Expected behavior This string is shown like this: It arranges the letters from right to left, and shows:
- Alif in initial-isolated form;
- Lam in initial form;
- Ayin in medial form;
- Ra in final form;
- Ba in initial form;
- Ya in medial form;
- Ta Marbutah in final form;
Screenshots It could be observed that this word is treated as left-to-right and then shaped together. Currently it is shown like this, which is wrong:
- Alif and Lam shown in a Lam-Alif ligature in its final form;
- Ayin in initial form;
- Ra in final form;
- Ba in medial form;
- Ya in initial form;
- Ta Marbutah in isolated form.
Desktop (please complete the following information):
- OS: 18363.720
- Version: 1.1.7.0
Additional context Please note that BiDi is not only supporting text that flows from right to left, but also the mixture of LTR and RTL scripts, and various BiDi control characters. Please refer to here for more detail: https://en.wikipedia.org/wiki/Bidirectional_text
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- Fix RTL text pasting when IME is enabled. Fixes #397. — committed to be5invis/Notepads by be5invis 4 years ago
- Fix RTL text pasting when IME is enabled. Fixes #397. (#398) — committed to 0x7c13/Notepads by be5invis 4 years ago
Test String:
Slightly modifying
PastePlainTextFromWindowsClipboard
could fix the IME-paste issue: