0

I face a weird problem when I use UTF-8 and the Persian language in python. When I want concat two strings with half-space ('\u200c') the last letter of the second word has been removed.

Here is an example: "ماشین+\u200c+ها" should be "ماشین‌ها" but it will be "ماشین‌ه"

It's my code:

name = 'ماشین'
postfix = 'ها'
name = name + '\u200c' + postfix
print(name)
//expected output: ماشین‌ها
//output: ماشین‌ه
Mahdi Akhi
  • 11
  • 8

0 Answers0