Nov-23-2019, 03:22 AM
Hey, guys. I met a problem when indexing a unicode string.
Here is the code:
Is there any way for me to get the real character
Here is the code:
>>> string = "ábcdefg" >>> string[0] aThe index result is
a
, but I hope it is á
. It seems the string index is based on unicode scalar rather than extended grapheme cluster.Is there any way for me to get the real character
á
, or in other words, can I visit string in human readable pattern ?