1 year ago
#359039
Mahdi Akhi
Remove letters when using UTF-8 in python
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: ماشینه
python
utf-8
nlp
python-unicode
farsi
0 Answers
Your Answer