Message Boards Message Boards

Why conversion of characters is not working with Cyrilic letters?

If we try to use ToLowerCase or ToUpperCase with Cyrillic characters, like:
In[22]:= ToLowerCase["АБВГ ABCD"]
Out[22]= "АБВГ abcd"

The result is not the expected. Also for some reson :
In[23]:= UpperCaseQ["Ю"]
Out[23]= False

I used to overcome that with a new function:
bgAlphabetLower = Delete[CharacterRange["а", "я"], {{-3}, {-5}}];
bgAlphabetUpper = Delete[CharacterRange["А", "Я"], {{-3}, {-5}}];
ruleSetBGUpperToLower = Table[bgAlphabetUpper[[i]] -> bgAlphabetLower[[i]], {i, 30}];
bgUpperToLower[s_String] := StringReplace[s, ruleSetBGUpperToLower];

But i guess it could be some core functionality that could be used as well.
Any suggestions / comments?
POSTED BY: Vladimir Tankov
4 years ago
This should indeed be implemented as you said above, it DOES work for the 'normal' latin alphabet and for the greek alphabet, i see no reason why it shouldn't work for the cyrillic. Korean, Hebrew, and Arabic don't have capitals, so there is should `work' already emoticon
POSTED BY: Sander Huisman
4 years ago
I understand these two letters were excluded for not being part of the Bulgarian alphabet, but I'd still keep {"э" -> "Э", "ы" -> "Ы"} and add at least "ѝ" -> "Ѝ" (i with grave, or "и с ударение").
POSTED BY: Ilian Gachevski
4 years ago
Vladimir, thank you for bringing this to our attention! We will take your suggestion into consideration.
POSTED BY: Moderation Team
4 years ago

Group Abstract Group Abstract