4 ms·
The uppercase mapping of Mkhedruli is Mtavruli in Unicode, but the titlecase mapping is not. If you use the uppercase mapping to automatically capitalise the fi
by CharlotteBuff 6y ago
The uppercase mapping of Mkhedruli is Mtavruli in Unicode, but the titlecase mapping is not. If you use the uppercase mapping to automatically capitalise the first letter of a sentence, you are not following the recommendations of the Unicode standard.
- Mindless2112 6y agoTIL about ToTitleCase. An easy-to-visualize example of the difference is ToUpperCase("dz") => "DZ" ToTitleCase("dz") => "Dz"
- techdragon 6y agoBut how many programmers are even aware of the fact Unicode has both an Uppercase and Titlecase mapping? Let alone that they can do different things! I routinely see code that treats titlecase as “set individual character in this Unicode string to its upper case equivalent”... It wouldn’t surprise me at all to find out this kind of titlecase vs uppercase mistake is a very widespread issue.
- TeMPOraL 6y agoI for one never heard of "titlecase" before. I guess that's what I get from learning text encoding from APIs exposed in programming languages.
- wereHamster 6y agoInteresting, I didn't know that there was a distinction between uppercase and titlecase. Perhaps unsurprisingly, unicode has a FAQ around just that: https://unicode.org/faq/casemap_charprop.html https://unicode.org/faq/casemap_charprop.html
- adontz 6y agoThe thing is one cannot type mtavruli letters. No modern keyboard layout which I am aware of allows that. If you press "s" key it types "ს" (S), but if you press "shift+s" it types "შ" (SH), which is entirely different letter. Georgian alphabet has 33 letters, 7 more letters than Latin, so letters ჭღშჟძჩთ are mapped to shift+something keystrokes. Russian language has 33 letters too, but Russian layouts override 7 punctuation keys ,.;'[]~ so pressing "," will not type a comma, but a letter "б", pressing "]" will type "ъ", so Russian layouts remap punctuation symbols to shift+number keystrokes. Georgian layouts keep punctuation key assignments same as for English and use shift+letter for additional letters. Modern fonts may have mtavruli styled glyphs, that is true, but they are placed on mkhedruli code points anyway, which is exactly the problem, no widely used fonts support this case switch anyway and render ⍰.
- ALan-ge 6y agoIn Arch-based Linux distros you can use Caps Lock. When Caps Lock is active, each letter comes out capitalized (including shift+ combinations). Mtavruli has already been supported by the following fonts: Google Noto (Android 11 DP, Arch Linux), SegoeUI, Calibri (Windows 2019 update), Helvetica Neue (macOS Catalina, iOS 13).