pucu
pucu copied to clipboard
Changing case according to language
I went through PUCU.pas as carefully as I could, but I couldn't find an answer to changing case (i.e. upper/lower/title) of a codepoint based on language.
Let me try to make the question a little clearer:
Consider 'LATIN CAPITAL LETTER I' (U+0049).
For all languages the lowercase for this is 'LATIN SMALL LETTER I' (U+0069) except for Turkish and Azerbaijani in which case it becomes 'LATIN SMALL LETTER DOTLESS I' (U+0131).
Similar ones also apply to other languages for title cases, etc.
The issue here is not a codepage since Unicode does not have codepages.
It's neither a script (or codeblock) issue.
It is, solely and purely a language one.
IOW, case change rules differ by the language a piece of string written in.
To sum it all, I suppose I am looking for a function such as:
NewString := LowerCase(OriginalString, Turkish); or NewString := UpperCase(OriginalString, German); or NewString := TitleCase(OriginalString, Spanish); etc.
Is there anything in PUCU.pas that serves (or can be made to serve) this purpose.