Message Boards Message Boards

4
|
4107 Views
|
3 Replies
|
6 Total Likes
View groups...
Share
Share this post:

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
3 Replies
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
Vladimir, thank you for bringing this to our attention! We will take your suggestion into consideration.
POSTED BY: Moderation Team
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
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract