Repository navigation
Description
capitalized() treats an apostrophe inside a Ukrainian or Belarusian word as the start of a new word, so the vowel after it takes a capital (measured on master 5f22996; locales.RU gives the same):
| Input | capitalized() |
right |
|---|---|---|
БЕЗУГЛА МАР'ЯНА ВОЛОДИМИРІВНА |
Безугла Мар'Яна Володимирівна |
Безугла Мар'яна Володимирівна |
БЕЗУГЛА МАР’ЯНА ВОЛОДИМИРІВНА |
Безугла Мар’Яна Володимирівна |
Безугла Мар’яна Володимирівна |
ІВАН П'ЯТАК |
Іван П'Ятак |
Іван П'ятак |
ар’єв володимир ігорович |
Ар’Єв Володимир Ігорович |
Ар’єв Володимир Ігорович |
ДЗМІТРЫЙ ЮР’ЕВІЧ КАМЫШЫК |
Дзмітрый Юр’Евіч Камышык |
Дзмітрый Юр’евіч Камышык |
БЕЗУГЛА МАРʼЯНА ВОЛОДИМИРІВНА (U+02BC) |
Безугла Марʼяна Володимирівна |
the same |
ЛЮДМИЛА О'КОННОР |
Людмила О'Коннор |
the same |
Under force=True a correctly written Мар'яна Безугла becomes Мар'Яна Безугла too. Parsing isn't affected: all three apostrophes stay inside the word.
R4 (case repair reads the unjoined mark) title-cases each word, and the word pattern _render._WORD, (\w|\.)+, stops at an apostrophe, so the letters after one are cased as a new word. That is what writes O'Brien and D'Angelo, and decisions/R4's #838 entry records that an apostrophe of any of the three spellings is not a word character. In Ukrainian and Belarusian, though, the apostrophe is part of the word's spelling: it stands before a vowel (Ukrainian я, ю, є, ї; Belarusian е, ё, і, ю, я) to mark it as pronounced separately, and that vowel is never a capital. U+02BC, the apostrophe Ukrainian orthography prescribes, is a modifier letter (Lm), which \w matches, so names written with it repair correctly. The keyboard's ' and ’, which is how the sources below write them, do not.
Measured (2026-11-08): all 23 Verkhovna Rada deputies written with ' or ’ (OpenSanctions ua_rada) repair wrong, whether the input is upper or lower case; all 367 Belarusian citizens' be.wikipedia titles with an apostrophe, uppercased, repair wrong. Not measured: how often Cyrillic text writes an Irish О' or French Д' name. JRC-Names stores no apostrophes, and the committed corpora hold no Cyrillic apostrophe.
Proposal, as an Except on R4
When: an apostrophe inside a Cyrillic word stands before я, ю, є, ї, е, ё or і.
Then: the letter after it keeps the word's lowercase.
Because: in Ukrainian and Belarusian spelling that apostrophe belongs to the word; it never divides a prefix from a name.
"БЕЗУГЛА МАР'ЯНА" → capitalized="Безугла Мар'яна"
"ІВАН П'ЯТАК" → capitalized="Іван П'ятак"
"ЛЮДМИЛА О'КОННОР" → capitalized="Людмила О'Коннор" · boundary
Questions
- Is the vowel after the apostrophe the right signal? The simpler alternative, the script alone (no capital after an apostrophe in any Cyrillic word), would give up
О'Коннор. - Latin has the same shape with no script to tell it apart: romanized Ukrainian
DEM'YAN→Dem'Yan, KikuyuNG'ANG'A→Ng'Ang'A, HawaiianKA'AHUMANU→Ka'Ahumanu, besideO'BrienandD'Angelo, which want the capital. Should that be a separate issue?
Activity
ჯეკ MA,ကြည် ကြည် ဌေး,एम. एस. वर्मा) #1256Address the second review round of the case-repair fixes