STINNER Victor <[email protected]> added the comment:
The two strings a different, that's why Python returns False.
a = U+0627 U+0646 U+062f U+064a U+0645 U+0634 U+06a9
b = U+0627 U+0646 U+062f U+06cc U+0645 U+0634 U+06a9
U+064a != U+06cc
>>> unicodedata.name('\u064a')
'ARABIC LETTER YEH'
>>> unicodedata.name('\u06cc')
'ARABIC LETTER FARSI YEH'
Python doesn't know arabic, it only compares code pointers: the number 0x064a
is not equal to the number 0x06cc.
It's not a bug, but a deliberate choice.
----------
nosy: +vstinner
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42511>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com