Next: , Up: Case mappings <unicase.h>   [Contents][Index]


14.1 Case mappings of characters

The following functions implement case mappings on Unicode characters — for those cases only where the result of the mapping is a again a single Unicode character.

These mappings are locale and context independent.

WARNING! These functions are not sufficient for languages such as German, Greek and Lithuanian. Better use the functions below that treat an entire string at once and are language aware.

Function: ucs4_t uc_toupper (ucs4_t uc)

Returns the uppercase mapping of the Unicode character uc.

Function: ucs4_t uc_tolower (ucs4_t uc)

Returns the lowercase mapping of the Unicode character uc.

Function: ucs4_t uc_totitle (ucs4_t uc)

Returns the titlecase mapping of the Unicode character uc.

The titlecase mapping of a character is to be used when the character should look like upper case and the following characters are lower cased.

For most characters, this is the same as the uppercase mapping. There are only few characters where the title case variant and the uuper case variant are different. These characters occur in the Latin writing of the Croatian, Bosnian, and Serbian languages.

Lower caseTitle caseUpper case
LATIN SMALL LETTER LJLATIN CAPITAL LETTER L WITH SMALL LETTER JLATIN CAPITAL LETTER LJ
LATIN SMALL LETTER NJLATIN CAPITAL LETTER N WITH SMALL LETTER JLATIN CAPITAL LETTER NJ
LATIN SMALL LETTER DZLATIN CAPITAL LETTER D WITH SMALL LETTER ZLATIN CAPITAL LETTER DZ
LATIN SMALL LETTER DZ WITH CARONLATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARONLATIN CAPITAL LETTER DZ WITH CARON

Next: Case mappings of strings, Up: Case mappings <unicase.h>   [Contents][Index]