UTF8UpperCase function
Converts the specified string to uppercase using Unicode case mapping rules.
Declaration
function UTF8UpperCase(const AInStr: string; const ALanguage: string='')
: stringArguments
AInStr | Values to convert in the function. |
ALanguage | Language code for the operation. |
Function result
Uppercase values for the specified string.
Description
UTF8UpperCase is a
String function used to convert the
UTF-8-encoded value in AInStr to its uppercase equivalent. UTF8UpperCase uses
Unicode Data as defined at the Unicode.org website.
[ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt] FTP link removed.
The conversion is performed using the Case Mapping Rules defined at
https://www.ksu.ru/eng/departments/ktk/test/perl/lib/unicode/UCDFF301.html#CaseMappings. Dead link removed.
ALanguage indicates the language code to use for the conversion. ALanguage should be specified using ISO 639-1 format, which uses 2 characters to represent each language. If the language has no code in ISO 639-1, then the 3-chars code from ISO 639-2 should be used. For example: "tr"for the Turkish language locale. Special handling is provided in the function for Turkish ('tr') and Azeri ('az') language codes.ALanguage can be set to an empty string ('') for maximum speed in the conversion.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
