Converting a character to upper case in string

bauss jj_1337 at live.dk
Sat Sep 22 21:45:46 UTC 2018


On Saturday, 22 September 2018 at 06:01:20 UTC, Vladimir 
Panteleev wrote:
> On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote:
>> How can I properly convert a character, say, first one to 
>> upper case in a unicode correct manner?
>
> That would depend on how you'd define correctness. If your 
> application needs to support "all" languages, then (depending 
> how you interpret it) the task may not be meaningful, as some 
> languages don't have the notion of "upper-case" or even 
> "character" (as an individual glyph). Some languages do have 
> those notions, but they serve a specific purpose that doesn't 
> align with the one in English (e.g. Lojban).
>
>> In which code level I should be working on? Grapheme? Or maybe 
>> code point is sufficient?
>
> Using graphemes is necessary if you need to support e.g. 
> combining marks (e.g. ̏◌ + S = ̏S).

Uppercase and Lowercase gets even more funky with Turkish.


More information about the Digitalmars-d-learn mailing list