Commit 9ee8eac
towupper/towlower: handle Turkic language special casing
For case conversion, Unicode has a standard mapping and a separate
list of mapping rules for special cases (file SpecialCasing.txt),
some of which are also language-dependent (as configured via locale).
However, most of these rules are context-dependent, e.g. Greek capital
Sigma is lowered to two different small sigmas, depending on the
position at the end of a word.
The POSIX API function towupper and tolower cannot consider context
as they work only on one character at a time. String casing functions
are unfortunately not available. The only special case conversions
that apply to a single character are i and I in Turkish and Azerbaijani,
where i keeps the dot when capitalised (U+0130) and I keeps not having
a dot when converted small (U+0131).
The patch handles these special cases, based on locale consideration.
(cherry picked from commit 4356ccd)1 parent 832cb70 commit 9ee8eac
3 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
72 | 81 | | |
73 | | - | |
| 82 | + | |
74 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
| |||
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
108 | | - | |
| 120 | + | |
109 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
110 | 125 | | |
111 | 126 | | |
112 | 127 | | |
| |||
145 | 160 | | |
146 | 161 | | |
147 | 162 | | |
148 | | - | |
| 163 | + | |
149 | 164 | | |
150 | | - | |
| 165 | + | |
151 | 166 | | |
152 | 167 | | |
153 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments