12.07.2015 Views

free openSS

free openSS

free openSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

40 ❘ FREE/OPEN SOURCE SOFTWARE: LOCALIZATIONwhere lang is a two-letter language code defined in ISO 639:1988. Three-letter codes in ISO 639-2 arealso allowed in the absence of the two-letter version. The ISO 639-2 Registration Authority atLibrary of Congress 27 has a complete list of language codes. territory is a two-letter country code defined in ISO 3166-1:1997. The list of two-letter countrycodes is available online from ISO 3166 Maintenance agency. 28 codeset describes the character set used in the locale. modifiers add more information for the locale by setting options (turn on flags or use equal signto set values). Options are separated by commas. This part is optional and implementationdependent.Different I18N frameworks provide different options.For example:fr_CA.ISO-8859-1= French language in Canada using ISO-8859-1 character setth_TH.TIS-620 = Thai language in Thailand using TIS-620 encodingIf territory or codeset is omitted, default values are usually resolved by means of locale aliasing.Note that for the GNU/Linux desktop, the modifiers part is not supported yet. Locale modifiers for XWindow are to be set through the XMODIFIERS environment instead.Character SetsCharacter set is part of locale definition. It defines all characters in a character set as well as how they areencoded for information interchange. In the GNU C library (glibc), locales are described in terms ofUnicode.A new character set is described as a Unicode subset, with each element associated by a byte string to beencoded in the target character set. For example, the UTF-8 encoding is described like this:... /x41LATIN CAPITAL LETTER A /x42LATIN CAPITAL LETTER B /x43LATIN CAPITAL LETTER C... /xe0/xb8/x81 THAI CHARACTER KO KAI /xe0/xb8/x82 THAI CHARACTER KHO KHAI /xe0/xb8/x83 THAI CHARACTER KHO KHUAT...The first column is the Unicode value. The second is the encoded byte string. And the rest are comments.As another example, TIS-620 encoding for Thai is simple 8-bit single-byte. The first half of the code tableis the same as ASCII, and the second half begins encoding the first character at 0xA1. Therefore, thecharacter map looks like:... /x41 /x42 /x43... /xa1 /xa2 /xa3...LATIN CAPITAL LETTER ALATIN CAPITAL LETTER BLATIN CAPITAL LETTER CTHAI CHARACTER KO KAITHAI CHARACTER KHO KHAITHAI CHARACTER KHO KHUAT27ISO, ISO 3166 Maintenance agency (ISO 3166/MA) – ISO’s focal point for country codes; available from www.iso.org/iso/en/prodsservices/iso3166ma/index.html.28ISO/IEC, ISO/IEC JTC1/SC22/WG20 – Internationalization; available from anubis.dkuug.dk/jtc1/sc22/wg20.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!