-1

Well, the problem is that the combination of Persian letters and numbers in the output of my script looks like this: 456b123

If it should be like this: 123B456

Note :For those who do not know the Persian language format,In Persian, letters are written from right to left and numbers from left to right

with open("output/mojaz1.csv", "r",newline="",encoding="utf-8") as mojaz:
                        reader = csv.reader(mojaz)
                        mojazha = list(reader)
                        print(mojazha)

output:۹۷ج۴۶۱۷۷ ...

oh god! I have this typing problem here too and I can't continue

os:windows python :3.6.13 I did not have this problem in Linux, but it is in Windows

1 Answers1

0

there is a character named RTL Embedding, with Unicode of U+202B, to copy it use Right-To-Left Embedding.

put it before the text and the paragraph becomes right to left, or add a U+202A character and everything is again back to left to right.

let's compare two texts here, the first one is plain, the second one has U+202B in the beginning:

نمونه!

vs

‫نمونه!

up to now it was all about the paragraph but what about texts within a paragraph? here we use U+200F character to align the text to right to left, and U+200E to align it back to left to right.

here are two examples, the first one is plain and the second one has U+200F in the beginning:

۱۲۳نمونه۴۵۶

vs

‏۱۲۳نمونه۴۵۶

and also, to make the text ۱۲۳نمونه‎۴۵۶ add U+200E before the second series of numbers (۴۵۶)

‫موفق باشی!

Amirreza
  • 153
  • 9