![]() ![]() In Latin alphabets, for example, "b", generally follows "a". This indicates the ordering of letters for comparison and sorting. This is used by Perl itself only for accessing operating system error messages via $! and $^E. # Category LC_MESSAGES: Error and other messages ![]() # Category LC_MONETARY: Formatting of monetary amounts This indicates how numbers should be formatted for human readability, for example the character used as the decimal point. These categories are broken down into the following types (some of which include a brief note here): # Category LC_NUMERIC: Numeric formatting ) # WHAT IS A LOCALEĪ locale is a set of data that describes various aspects of how various communities in the world categorize their world. However, it is possible to compute the POSIX locale data from them, and earlier CLDR versions had these already extracted for you as UTF-8 locales. At the time of this writing, there was no CPAN module that provides access to this XML-encoded data. ![]() (Unicode is also creating CLDR, the "Common Locale Data Repository", which includes more types of information than are available in the POSIX locale system. There are currently no UTF-8 locales for EBCDIC platforms. Perl continues to support the old non UTF-8 locales as well. The name of the locale is ignored, if your system has a tr_TR.UTF-8 locale and it doesn't behave like a Turkic locale, perl will treat it like a non-Turkic locale. Starting in Perl v5.30, Perl detects Turkic locales by their behaviour, and seamlessly handles both types previously only the non-Turkic one was supported. There are actually two slightly different types of UTF-8 locales: one for Turkic languages and one for everything else. However, for earlier releases or for better control, use Unicode::Collate. Starting in v5.26, Perl can handle these reasonably as well, depending on the platform's implementation. ![]() Starting in v5.20, Perl fully supports UTF-8 locales, except for sorting and string comparisons like lt and ge. These are locales whose character set is Unicode, encoded in UTF-8. Unicode was invented (see perlunitut for an introduction to that) in part to address these design deficiencies, and nowadays, there is a series of "UTF-8 locales", based on Unicode. Unfortunately, there are quite a few deficiencies with the design (and often, the implementations) of locales. Perl doesn't support any other multi-byte locales, such as the ones for East Asian languages. Perl supports single-byte locales that are supersets of ASCII, such as the ISO 8859 ones, and one multi-byte-type locale, UTF-8 ones, described in the next paragraph. This is controlled per application by using one pragma, one function call, and several environment variables. Perl has been extended to support certain types of locales available in the locale system. The process of making such an application take account of its users' preferences in these kinds of matters is called internationalization (often abbreviated as i18n) telling such an application about a particular set of preferences is known as localization ( l10n). And applications were and are being written that use the locale mechanism. To address these deficiencies, the concept of locales was invented (formally the ISO C, XPG4, POSIX 1.c "locale system"). But it doesn't work so well even for other English speakers, who may use different currencies, such as the pound sterling (as the symbol for that currency is not in ASCII) and it's hopelessly inadequate for many of the thousands of the world's other languages. In the beginning there was ASCII, the "American Standard Code for Information Interchange", which works quite well for Americans with their English alphabet and dollar-denominated currency. Perllocale - Perl locale handling (internationalization and localization) #DESCRIPTION Collation of strings containing embedded NUL characters.Category LC_TIME: Respresentation of time.Category LC_MONETARY: Formatting of monetary amounts.Category LC_NUMERIC: Numeric Formatting.Category LC_COLLATE: Collation: Text Comparisons and Sorting.Permanently fixing your system's locale configuration. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |