There are two ways to get the Cyrillic character ‘й’ in your string
[Everyday code]
Today we had an issue with a Cyrillic character where some of the python scripts were not working. Turns out that the it is a know and special case. In summary, be careful when using Cyrillic character ‘й’ and pay special attention on how this files are processed.:
In addition, you are probably hitting normalization issues. There are two ways to get the Cyrillic character 'й' in your string, one of them is a single code point, the other is two code points:>>> a = 'й'
>>> b = 'й'
>>> len(a), unicodedata.name(a)
(1, 'CYRILLIC SMALL LETTER SHORT I')
>>> len(b), unicodedata.name(b[0]), unicodedata.name(b[1])
(2, 'CYRILLIC SMALL LETTER I', 'COMBINING BREVE')
Reply
You must be logged in to post a comment.