PageRenderTime 48ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/lib-python/2.7/locale.py

https://bitbucket.org/bwesterb/pypy
Python | 1875 lines | 1807 code | 28 blank | 40 comment | 43 complexity | aa0fea1b8949df5df13fb904ac40d539 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. """ Locale support.
  2. The module provides low-level access to the C lib's locale APIs
  3. and adds high level number formatting APIs as well as a locale
  4. aliasing engine to complement these.
  5. The aliasing engine includes support for many commonly used locale
  6. names and maps them to values suitable for passing to the C lib's
  7. setlocale() function. It also includes default encodings for all
  8. supported locale names.
  9. """
  10. import sys
  11. import encodings
  12. import encodings.aliases
  13. import re
  14. import operator
  15. import functools
  16. # Try importing the _locale module.
  17. #
  18. # If this fails, fall back on a basic 'C' locale emulation.
  19. # Yuck: LC_MESSAGES is non-standard: can't tell whether it exists before
  20. # trying the import. So __all__ is also fiddled at the end of the file.
  21. __all__ = ["getlocale", "getdefaultlocale", "getpreferredencoding", "Error",
  22. "setlocale", "resetlocale", "localeconv", "strcoll", "strxfrm",
  23. "str", "atof", "atoi", "format", "format_string", "currency",
  24. "normalize", "LC_CTYPE", "LC_COLLATE", "LC_TIME", "LC_MONETARY",
  25. "LC_NUMERIC", "LC_ALL", "CHAR_MAX"]
  26. try:
  27. from _locale import *
  28. except ImportError:
  29. # Locale emulation
  30. CHAR_MAX = 127
  31. LC_ALL = 6
  32. LC_COLLATE = 3
  33. LC_CTYPE = 0
  34. LC_MESSAGES = 5
  35. LC_MONETARY = 4
  36. LC_NUMERIC = 1
  37. LC_TIME = 2
  38. Error = ValueError
  39. def localeconv():
  40. """ localeconv() -> dict.
  41. Returns numeric and monetary locale-specific parameters.
  42. """
  43. # 'C' locale default values
  44. return {'grouping': [127],
  45. 'currency_symbol': '',
  46. 'n_sign_posn': 127,
  47. 'p_cs_precedes': 127,
  48. 'n_cs_precedes': 127,
  49. 'mon_grouping': [],
  50. 'n_sep_by_space': 127,
  51. 'decimal_point': '.',
  52. 'negative_sign': '',
  53. 'positive_sign': '',
  54. 'p_sep_by_space': 127,
  55. 'int_curr_symbol': '',
  56. 'p_sign_posn': 127,
  57. 'thousands_sep': '',
  58. 'mon_thousands_sep': '',
  59. 'frac_digits': 127,
  60. 'mon_decimal_point': '',
  61. 'int_frac_digits': 127}
  62. def setlocale(category, value=None):
  63. """ setlocale(integer,string=None) -> string.
  64. Activates/queries locale processing.
  65. """
  66. if value not in (None, '', 'C'):
  67. raise Error, '_locale emulation only supports "C" locale'
  68. return 'C'
  69. def strcoll(a,b):
  70. """ strcoll(string,string) -> int.
  71. Compares two strings according to the locale.
  72. """
  73. return cmp(a,b)
  74. def strxfrm(s):
  75. """ strxfrm(string) -> string.
  76. Returns a string that behaves for cmp locale-aware.
  77. """
  78. return s
  79. _localeconv = localeconv
  80. # With this dict, you can override some items of localeconv's return value.
  81. # This is useful for testing purposes.
  82. _override_localeconv = {}
  83. @functools.wraps(_localeconv)
  84. def localeconv():
  85. d = _localeconv()
  86. if _override_localeconv:
  87. d.update(_override_localeconv)
  88. return d
  89. ### Number formatting APIs
  90. # Author: Martin von Loewis
  91. # improved by Georg Brandl
  92. # Iterate over grouping intervals
  93. def _grouping_intervals(grouping):
  94. last_interval = None
  95. for interval in grouping:
  96. # if grouping is -1, we are done
  97. if interval == CHAR_MAX:
  98. return
  99. # 0: re-use last group ad infinitum
  100. if interval == 0:
  101. if last_interval is None:
  102. raise ValueError("invalid grouping")
  103. while True:
  104. yield last_interval
  105. yield interval
  106. last_interval = interval
  107. #perform the grouping from right to left
  108. def _group(s, monetary=False):
  109. conv = localeconv()
  110. thousands_sep = conv[monetary and 'mon_thousands_sep' or 'thousands_sep']
  111. grouping = conv[monetary and 'mon_grouping' or 'grouping']
  112. if not grouping:
  113. return (s, 0)
  114. if s[-1] == ' ':
  115. stripped = s.rstrip()
  116. right_spaces = s[len(stripped):]
  117. s = stripped
  118. else:
  119. right_spaces = ''
  120. left_spaces = ''
  121. groups = []
  122. for interval in _grouping_intervals(grouping):
  123. if not s or s[-1] not in "0123456789":
  124. # only non-digit characters remain (sign, spaces)
  125. left_spaces = s
  126. s = ''
  127. break
  128. groups.append(s[-interval:])
  129. s = s[:-interval]
  130. if s:
  131. groups.append(s)
  132. groups.reverse()
  133. return (
  134. left_spaces + thousands_sep.join(groups) + right_spaces,
  135. len(thousands_sep) * (len(groups) - 1)
  136. )
  137. # Strip a given amount of excess padding from the given string
  138. def _strip_padding(s, amount):
  139. lpos = 0
  140. while amount and s[lpos] == ' ':
  141. lpos += 1
  142. amount -= 1
  143. rpos = len(s) - 1
  144. while amount and s[rpos] == ' ':
  145. rpos -= 1
  146. amount -= 1
  147. return s[lpos:rpos+1]
  148. _percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?'
  149. r'(?P<modifiers>[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]')
  150. def format(percent, value, grouping=False, monetary=False, *additional):
  151. """Returns the locale-aware substitution of a %? specifier
  152. (percent).
  153. additional is for format strings which contain one or more
  154. '*' modifiers."""
  155. # this is only for one-percent-specifier strings and this should be checked
  156. match = _percent_re.match(percent)
  157. if not match or len(match.group())!= len(percent):
  158. raise ValueError(("format() must be given exactly one %%char "
  159. "format specifier, %s not valid") % repr(percent))
  160. return _format(percent, value, grouping, monetary, *additional)
  161. def _format(percent, value, grouping=False, monetary=False, *additional):
  162. if additional:
  163. formatted = percent % ((value,) + additional)
  164. else:
  165. formatted = percent % value
  166. # floats and decimal ints need special action!
  167. if percent[-1] in 'eEfFgG':
  168. seps = 0
  169. parts = formatted.split('.')
  170. if grouping:
  171. parts[0], seps = _group(parts[0], monetary=monetary)
  172. decimal_point = localeconv()[monetary and 'mon_decimal_point'
  173. or 'decimal_point']
  174. formatted = decimal_point.join(parts)
  175. if seps:
  176. formatted = _strip_padding(formatted, seps)
  177. elif percent[-1] in 'diu':
  178. seps = 0
  179. if grouping:
  180. formatted, seps = _group(formatted, monetary=monetary)
  181. if seps:
  182. formatted = _strip_padding(formatted, seps)
  183. return formatted
  184. def format_string(f, val, grouping=False):
  185. """Formats a string in the same way that the % formatting would use,
  186. but takes the current locale into account.
  187. Grouping is applied if the third parameter is true."""
  188. percents = list(_percent_re.finditer(f))
  189. new_f = _percent_re.sub('%s', f)
  190. if operator.isMappingType(val):
  191. new_val = []
  192. for perc in percents:
  193. if perc.group()[-1]=='%':
  194. new_val.append('%')
  195. else:
  196. new_val.append(format(perc.group(), val, grouping))
  197. else:
  198. if not isinstance(val, tuple):
  199. val = (val,)
  200. new_val = []
  201. i = 0
  202. for perc in percents:
  203. if perc.group()[-1]=='%':
  204. new_val.append('%')
  205. else:
  206. starcount = perc.group('modifiers').count('*')
  207. new_val.append(_format(perc.group(),
  208. val[i],
  209. grouping,
  210. False,
  211. *val[i+1:i+1+starcount]))
  212. i += (1 + starcount)
  213. val = tuple(new_val)
  214. return new_f % val
  215. def currency(val, symbol=True, grouping=False, international=False):
  216. """Formats val according to the currency settings
  217. in the current locale."""
  218. conv = localeconv()
  219. # check for illegal values
  220. digits = conv[international and 'int_frac_digits' or 'frac_digits']
  221. if digits == 127:
  222. raise ValueError("Currency formatting is not possible using "
  223. "the 'C' locale.")
  224. s = format('%%.%if' % digits, abs(val), grouping, monetary=True)
  225. # '<' and '>' are markers if the sign must be inserted between symbol and value
  226. s = '<' + s + '>'
  227. if symbol:
  228. smb = conv[international and 'int_curr_symbol' or 'currency_symbol']
  229. precedes = conv[val<0 and 'n_cs_precedes' or 'p_cs_precedes']
  230. separated = conv[val<0 and 'n_sep_by_space' or 'p_sep_by_space']
  231. if precedes:
  232. s = smb + (separated and ' ' or '') + s
  233. else:
  234. s = s + (separated and ' ' or '') + smb
  235. sign_pos = conv[val<0 and 'n_sign_posn' or 'p_sign_posn']
  236. sign = conv[val<0 and 'negative_sign' or 'positive_sign']
  237. if sign_pos == 0:
  238. s = '(' + s + ')'
  239. elif sign_pos == 1:
  240. s = sign + s
  241. elif sign_pos == 2:
  242. s = s + sign
  243. elif sign_pos == 3:
  244. s = s.replace('<', sign)
  245. elif sign_pos == 4:
  246. s = s.replace('>', sign)
  247. else:
  248. # the default if nothing specified;
  249. # this should be the most fitting sign position
  250. s = sign + s
  251. return s.replace('<', '').replace('>', '')
  252. def str(val):
  253. """Convert float to integer, taking the locale into account."""
  254. return format("%.12g", val)
  255. def atof(string, func=float):
  256. "Parses a string as a float according to the locale settings."
  257. #First, get rid of the grouping
  258. ts = localeconv()['thousands_sep']
  259. if ts:
  260. string = string.replace(ts, '')
  261. #next, replace the decimal point with a dot
  262. dd = localeconv()['decimal_point']
  263. if dd:
  264. string = string.replace(dd, '.')
  265. #finally, parse the string
  266. return func(string)
  267. def atoi(str):
  268. "Converts a string to an integer according to the locale settings."
  269. return atof(str, int)
  270. def _test():
  271. setlocale(LC_ALL, "")
  272. #do grouping
  273. s1 = format("%d", 123456789,1)
  274. print s1, "is", atoi(s1)
  275. #standard formatting
  276. s1 = str(3.14)
  277. print s1, "is", atof(s1)
  278. ### Locale name aliasing engine
  279. # Author: Marc-Andre Lemburg, mal@lemburg.com
  280. # Various tweaks by Fredrik Lundh <fredrik@pythonware.com>
  281. # store away the low-level version of setlocale (it's
  282. # overridden below)
  283. _setlocale = setlocale
  284. # Avoid relying on the locale-dependent .lower() method
  285. # (see issue #1813).
  286. _ascii_lower_map = ''.join(
  287. chr(x + 32 if x >= ord('A') and x <= ord('Z') else x)
  288. for x in range(256)
  289. )
  290. def normalize(localename):
  291. """ Returns a normalized locale code for the given locale
  292. name.
  293. The returned locale code is formatted for use with
  294. setlocale().
  295. If normalization fails, the original name is returned
  296. unchanged.
  297. If the given encoding is not known, the function defaults to
  298. the default encoding for the locale code just like setlocale()
  299. does.
  300. """
  301. # Normalize the locale name and extract the encoding
  302. if isinstance(localename, unicode):
  303. localename = localename.encode('ascii')
  304. fullname = localename.translate(_ascii_lower_map)
  305. if ':' in fullname:
  306. # ':' is sometimes used as encoding delimiter.
  307. fullname = fullname.replace(':', '.')
  308. if '.' in fullname:
  309. langname, encoding = fullname.split('.')[:2]
  310. fullname = langname + '.' + encoding
  311. else:
  312. langname = fullname
  313. encoding = ''
  314. # First lookup: fullname (possibly with encoding)
  315. norm_encoding = encoding.replace('-', '')
  316. norm_encoding = norm_encoding.replace('_', '')
  317. lookup_name = langname + '.' + encoding
  318. code = locale_alias.get(lookup_name, None)
  319. if code is not None:
  320. return code
  321. #print 'first lookup failed'
  322. # Second try: langname (without encoding)
  323. code = locale_alias.get(langname, None)
  324. if code is not None:
  325. #print 'langname lookup succeeded'
  326. if '.' in code:
  327. langname, defenc = code.split('.')
  328. else:
  329. langname = code
  330. defenc = ''
  331. if encoding:
  332. # Convert the encoding to a C lib compatible encoding string
  333. norm_encoding = encodings.normalize_encoding(encoding)
  334. #print 'norm encoding: %r' % norm_encoding
  335. norm_encoding = encodings.aliases.aliases.get(norm_encoding,
  336. norm_encoding)
  337. #print 'aliased encoding: %r' % norm_encoding
  338. encoding = locale_encoding_alias.get(norm_encoding,
  339. norm_encoding)
  340. else:
  341. encoding = defenc
  342. #print 'found encoding %r' % encoding
  343. if encoding:
  344. return langname + '.' + encoding
  345. else:
  346. return langname
  347. else:
  348. return localename
  349. def _parse_localename(localename):
  350. """ Parses the locale code for localename and returns the
  351. result as tuple (language code, encoding).
  352. The localename is normalized and passed through the locale
  353. alias engine. A ValueError is raised in case the locale name
  354. cannot be parsed.
  355. The language code corresponds to RFC 1766. code and encoding
  356. can be None in case the values cannot be determined or are
  357. unknown to this implementation.
  358. """
  359. code = normalize(localename)
  360. if '@' in code:
  361. # Deal with locale modifiers
  362. code, modifier = code.split('@')
  363. if modifier == 'euro' and '.' not in code:
  364. # Assume Latin-9 for @euro locales. This is bogus,
  365. # since some systems may use other encodings for these
  366. # locales. Also, we ignore other modifiers.
  367. return code, 'iso-8859-15'
  368. if '.' in code:
  369. return tuple(code.split('.')[:2])
  370. elif code == 'C':
  371. return None, None
  372. raise ValueError, 'unknown locale: %s' % localename
  373. def _build_localename(localetuple):
  374. """ Builds a locale code from the given tuple (language code,
  375. encoding).
  376. No aliasing or normalizing takes place.
  377. """
  378. language, encoding = localetuple
  379. if language is None:
  380. language = 'C'
  381. if encoding is None:
  382. return language
  383. else:
  384. return language + '.' + encoding
  385. def getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')):
  386. """ Tries to determine the default locale settings and returns
  387. them as tuple (language code, encoding).
  388. According to POSIX, a program which has not called
  389. setlocale(LC_ALL, "") runs using the portable 'C' locale.
  390. Calling setlocale(LC_ALL, "") lets it use the default locale as
  391. defined by the LANG variable. Since we don't want to interfere
  392. with the current locale setting we thus emulate the behavior
  393. in the way described above.
  394. To maintain compatibility with other platforms, not only the
  395. LANG variable is tested, but a list of variables given as
  396. envvars parameter. The first found to be defined will be
  397. used. envvars defaults to the search path used in GNU gettext;
  398. it must always contain the variable name 'LANG'.
  399. Except for the code 'C', the language code corresponds to RFC
  400. 1766. code and encoding can be None in case the values cannot
  401. be determined.
  402. """
  403. try:
  404. # check if it's supported by the _locale module
  405. import _locale
  406. code, encoding = _locale._getdefaultlocale()
  407. except (ImportError, AttributeError):
  408. pass
  409. else:
  410. # make sure the code/encoding values are valid
  411. if sys.platform == "win32" and code and code[:2] == "0x":
  412. # map windows language identifier to language name
  413. code = windows_locale.get(int(code, 0))
  414. # ...add other platform-specific processing here, if
  415. # necessary...
  416. return code, encoding
  417. # fall back on POSIX behaviour
  418. import os
  419. lookup = os.environ.get
  420. for variable in envvars:
  421. localename = lookup(variable,None)
  422. if localename:
  423. if variable == 'LANGUAGE':
  424. localename = localename.split(':')[0]
  425. break
  426. else:
  427. localename = 'C'
  428. return _parse_localename(localename)
  429. def getlocale(category=LC_CTYPE):
  430. """ Returns the current setting for the given locale category as
  431. tuple (language code, encoding).
  432. category may be one of the LC_* value except LC_ALL. It
  433. defaults to LC_CTYPE.
  434. Except for the code 'C', the language code corresponds to RFC
  435. 1766. code and encoding can be None in case the values cannot
  436. be determined.
  437. """
  438. localename = _setlocale(category)
  439. if category == LC_ALL and ';' in localename:
  440. raise TypeError, 'category LC_ALL is not supported'
  441. return _parse_localename(localename)
  442. def setlocale(category, locale=None):
  443. """ Set the locale for the given category. The locale can be
  444. a string, an iterable of two strings (language code and encoding),
  445. or None.
  446. Iterables are converted to strings using the locale aliasing
  447. engine. Locale strings are passed directly to the C lib.
  448. category may be given as one of the LC_* values.
  449. """
  450. if locale and type(locale) is not type(""):
  451. # convert to string
  452. locale = normalize(_build_localename(locale))
  453. return _setlocale(category, locale)
  454. def resetlocale(category=LC_ALL):
  455. """ Sets the locale for category to the default setting.
  456. The default setting is determined by calling
  457. getdefaultlocale(). category defaults to LC_ALL.
  458. """
  459. _setlocale(category, _build_localename(getdefaultlocale()))
  460. if sys.platform.startswith("win"):
  461. # On Win32, this will return the ANSI code page
  462. def getpreferredencoding(do_setlocale = True):
  463. """Return the charset that the user is likely using."""
  464. import _locale
  465. return _locale._getdefaultlocale()[1]
  466. else:
  467. # On Unix, if CODESET is available, use that.
  468. try:
  469. CODESET
  470. except NameError:
  471. # Fall back to parsing environment variables :-(
  472. def getpreferredencoding(do_setlocale = True):
  473. """Return the charset that the user is likely using,
  474. by looking at environment variables."""
  475. return getdefaultlocale()[1]
  476. else:
  477. def getpreferredencoding(do_setlocale = True):
  478. """Return the charset that the user is likely using,
  479. according to the system configuration."""
  480. if do_setlocale:
  481. oldloc = setlocale(LC_CTYPE)
  482. try:
  483. setlocale(LC_CTYPE, "")
  484. except Error:
  485. pass
  486. result = nl_langinfo(CODESET)
  487. setlocale(LC_CTYPE, oldloc)
  488. return result
  489. else:
  490. return nl_langinfo(CODESET)
  491. ### Database
  492. #
  493. # The following data was extracted from the locale.alias file which
  494. # comes with X11 and then hand edited removing the explicit encoding
  495. # definitions and adding some more aliases. The file is usually
  496. # available as /usr/lib/X11/locale/locale.alias.
  497. #
  498. #
  499. # The local_encoding_alias table maps lowercase encoding alias names
  500. # to C locale encoding names (case-sensitive). Note that normalize()
  501. # first looks up the encoding in the encodings.aliases dictionary and
  502. # then applies this mapping to find the correct C lib name for the
  503. # encoding.
  504. #
  505. locale_encoding_alias = {
  506. # Mappings for non-standard encoding names used in locale names
  507. '437': 'C',
  508. 'c': 'C',
  509. 'en': 'ISO8859-1',
  510. 'jis': 'JIS7',
  511. 'jis7': 'JIS7',
  512. 'ajec': 'eucJP',
  513. # Mappings from Python codec names to C lib encoding names
  514. 'ascii': 'ISO8859-1',
  515. 'latin_1': 'ISO8859-1',
  516. 'iso8859_1': 'ISO8859-1',
  517. 'iso8859_10': 'ISO8859-10',
  518. 'iso8859_11': 'ISO8859-11',
  519. 'iso8859_13': 'ISO8859-13',
  520. 'iso8859_14': 'ISO8859-14',
  521. 'iso8859_15': 'ISO8859-15',
  522. 'iso8859_16': 'ISO8859-16',
  523. 'iso8859_2': 'ISO8859-2',
  524. 'iso8859_3': 'ISO8859-3',
  525. 'iso8859_4': 'ISO8859-4',
  526. 'iso8859_5': 'ISO8859-5',
  527. 'iso8859_6': 'ISO8859-6',
  528. 'iso8859_7': 'ISO8859-7',
  529. 'iso8859_8': 'ISO8859-8',
  530. 'iso8859_9': 'ISO8859-9',
  531. 'iso2022_jp': 'JIS7',
  532. 'shift_jis': 'SJIS',
  533. 'tactis': 'TACTIS',
  534. 'euc_jp': 'eucJP',
  535. 'euc_kr': 'eucKR',
  536. 'utf_8': 'UTF-8',
  537. 'koi8_r': 'KOI8-R',
  538. 'koi8_u': 'KOI8-U',
  539. # XXX This list is still incomplete. If you know more
  540. # mappings, please file a bug report. Thanks.
  541. }
  542. #
  543. # The locale_alias table maps lowercase alias names to C locale names
  544. # (case-sensitive). Encodings are always separated from the locale
  545. # name using a dot ('.'); they should only be given in case the
  546. # language name is needed to interpret the given encoding alias
  547. # correctly (CJK codes often have this need).
  548. #
  549. # Note that the normalize() function which uses this tables
  550. # removes '_' and '-' characters from the encoding part of the
  551. # locale name before doing the lookup. This saves a lot of
  552. # space in the table.
  553. #
  554. # MAL 2004-12-10:
  555. # Updated alias mapping to most recent locale.alias file
  556. # from X.org distribution using makelocalealias.py.
  557. #
  558. # These are the differences compared to the old mapping (Python 2.4
  559. # and older):
  560. #
  561. # updated 'bg' -> 'bg_BG.ISO8859-5' to 'bg_BG.CP1251'
  562. # updated 'bg_bg' -> 'bg_BG.ISO8859-5' to 'bg_BG.CP1251'
  563. # updated 'bulgarian' -> 'bg_BG.ISO8859-5' to 'bg_BG.CP1251'
  564. # updated 'cz' -> 'cz_CZ.ISO8859-2' to 'cs_CZ.ISO8859-2'
  565. # updated 'cz_cz' -> 'cz_CZ.ISO8859-2' to 'cs_CZ.ISO8859-2'
  566. # updated 'czech' -> 'cs_CS.ISO8859-2' to 'cs_CZ.ISO8859-2'
  567. # updated 'dutch' -> 'nl_BE.ISO8859-1' to 'nl_NL.ISO8859-1'
  568. # updated 'et' -> 'et_EE.ISO8859-4' to 'et_EE.ISO8859-15'
  569. # updated 'et_ee' -> 'et_EE.ISO8859-4' to 'et_EE.ISO8859-15'
  570. # updated 'fi' -> 'fi_FI.ISO8859-1' to 'fi_FI.ISO8859-15'
  571. # updated 'fi_fi' -> 'fi_FI.ISO8859-1' to 'fi_FI.ISO8859-15'
  572. # updated 'iw' -> 'iw_IL.ISO8859-8' to 'he_IL.ISO8859-8'
  573. # updated 'iw_il' -> 'iw_IL.ISO8859-8' to 'he_IL.ISO8859-8'
  574. # updated 'japanese' -> 'ja_JP.SJIS' to 'ja_JP.eucJP'
  575. # updated 'lt' -> 'lt_LT.ISO8859-4' to 'lt_LT.ISO8859-13'
  576. # updated 'lv' -> 'lv_LV.ISO8859-4' to 'lv_LV.ISO8859-13'
  577. # updated 'sl' -> 'sl_CS.ISO8859-2' to 'sl_SI.ISO8859-2'
  578. # updated 'slovene' -> 'sl_CS.ISO8859-2' to 'sl_SI.ISO8859-2'
  579. # updated 'th_th' -> 'th_TH.TACTIS' to 'th_TH.ISO8859-11'
  580. # updated 'zh_cn' -> 'zh_CN.eucCN' to 'zh_CN.gb2312'
  581. # updated 'zh_cn.big5' -> 'zh_TW.eucTW' to 'zh_TW.big5'
  582. # updated 'zh_tw' -> 'zh_TW.eucTW' to 'zh_TW.big5'
  583. #
  584. # MAL 2008-05-30:
  585. # Updated alias mapping to most recent locale.alias file
  586. # from X.org distribution using makelocalealias.py.
  587. #
  588. # These are the differences compared to the old mapping (Python 2.5
  589. # and older):
  590. #
  591. # updated 'cs_cs.iso88592' -> 'cs_CZ.ISO8859-2' to 'cs_CS.ISO8859-2'
  592. # updated 'serbocroatian' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
  593. # updated 'sh' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
  594. # updated 'sh_hr.iso88592' -> 'sh_HR.ISO8859-2' to 'hr_HR.ISO8859-2'
  595. # updated 'sh_sp' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
  596. # updated 'sh_yu' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
  597. # updated 'sp' -> 'sp_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  598. # updated 'sp_yu' -> 'sp_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  599. # updated 'sr' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  600. # updated 'sr@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  601. # updated 'sr_sp' -> 'sr_SP.ISO8859-2' to 'sr_CS.ISO8859-2'
  602. # updated 'sr_yu' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  603. # updated 'sr_yu.cp1251@cyrillic' -> 'sr_YU.CP1251' to 'sr_CS.CP1251'
  604. # updated 'sr_yu.iso88592' -> 'sr_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
  605. # updated 'sr_yu.iso88595' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  606. # updated 'sr_yu.iso88595@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  607. # updated 'sr_yu.microsoftcp1251@cyrillic' -> 'sr_YU.CP1251' to 'sr_CS.CP1251'
  608. # updated 'sr_yu.utf8@cyrillic' -> 'sr_YU.UTF-8' to 'sr_CS.UTF-8'
  609. # updated 'sr_yu@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
  610. #
  611. # AP 2010-04-12:
  612. # Updated alias mapping to most recent locale.alias file
  613. # from X.org distribution using makelocalealias.py.
  614. #
  615. # These are the differences compared to the old mapping (Python 2.6.5
  616. # and older):
  617. #
  618. # updated 'ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8'
  619. # updated 'ru_ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8'
  620. # updated 'serbocroatian' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
  621. # updated 'sh' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
  622. # updated 'sh_yu' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
  623. # updated 'sr' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8'
  624. # updated 'sr@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8'
  625. # updated 'sr@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
  626. # updated 'sr_cs.utf8@latn' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8@latin'
  627. # updated 'sr_cs@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
  628. # updated 'sr_yu' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8@latin'
  629. # updated 'sr_yu.utf8@cyrillic' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8'
  630. # updated 'sr_yu@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8'
  631. #
  632. locale_alias = {
  633. 'a3': 'a3_AZ.KOI8-C',
  634. 'a3_az': 'a3_AZ.KOI8-C',
  635. 'a3_az.koi8c': 'a3_AZ.KOI8-C',
  636. 'af': 'af_ZA.ISO8859-1',
  637. 'af_za': 'af_ZA.ISO8859-1',
  638. 'af_za.iso88591': 'af_ZA.ISO8859-1',
  639. 'am': 'am_ET.UTF-8',
  640. 'am_et': 'am_ET.UTF-8',
  641. 'american': 'en_US.ISO8859-1',
  642. 'american.iso88591': 'en_US.ISO8859-1',
  643. 'ar': 'ar_AA.ISO8859-6',
  644. 'ar_aa': 'ar_AA.ISO8859-6',
  645. 'ar_aa.iso88596': 'ar_AA.ISO8859-6',
  646. 'ar_ae': 'ar_AE.ISO8859-6',
  647. 'ar_ae.iso88596': 'ar_AE.ISO8859-6',
  648. 'ar_bh': 'ar_BH.ISO8859-6',
  649. 'ar_bh.iso88596': 'ar_BH.ISO8859-6',
  650. 'ar_dz': 'ar_DZ.ISO8859-6',
  651. 'ar_dz.iso88596': 'ar_DZ.ISO8859-6',
  652. 'ar_eg': 'ar_EG.ISO8859-6',
  653. 'ar_eg.iso88596': 'ar_EG.ISO8859-6',
  654. 'ar_iq': 'ar_IQ.ISO8859-6',
  655. 'ar_iq.iso88596': 'ar_IQ.ISO8859-6',
  656. 'ar_jo': 'ar_JO.ISO8859-6',
  657. 'ar_jo.iso88596': 'ar_JO.ISO8859-6',
  658. 'ar_kw': 'ar_KW.ISO8859-6',
  659. 'ar_kw.iso88596': 'ar_KW.ISO8859-6',
  660. 'ar_lb': 'ar_LB.ISO8859-6',
  661. 'ar_lb.iso88596': 'ar_LB.ISO8859-6',
  662. 'ar_ly': 'ar_LY.ISO8859-6',
  663. 'ar_ly.iso88596': 'ar_LY.ISO8859-6',
  664. 'ar_ma': 'ar_MA.ISO8859-6',
  665. 'ar_ma.iso88596': 'ar_MA.ISO8859-6',
  666. 'ar_om': 'ar_OM.ISO8859-6',
  667. 'ar_om.iso88596': 'ar_OM.ISO8859-6',
  668. 'ar_qa': 'ar_QA.ISO8859-6',
  669. 'ar_qa.iso88596': 'ar_QA.ISO8859-6',
  670. 'ar_sa': 'ar_SA.ISO8859-6',
  671. 'ar_sa.iso88596': 'ar_SA.ISO8859-6',
  672. 'ar_sd': 'ar_SD.ISO8859-6',
  673. 'ar_sd.iso88596': 'ar_SD.ISO8859-6',
  674. 'ar_sy': 'ar_SY.ISO8859-6',
  675. 'ar_sy.iso88596': 'ar_SY.ISO8859-6',
  676. 'ar_tn': 'ar_TN.ISO8859-6',
  677. 'ar_tn.iso88596': 'ar_TN.ISO8859-6',
  678. 'ar_ye': 'ar_YE.ISO8859-6',
  679. 'ar_ye.iso88596': 'ar_YE.ISO8859-6',
  680. 'arabic': 'ar_AA.ISO8859-6',
  681. 'arabic.iso88596': 'ar_AA.ISO8859-6',
  682. 'as': 'as_IN.UTF-8',
  683. 'az': 'az_AZ.ISO8859-9E',
  684. 'az_az': 'az_AZ.ISO8859-9E',
  685. 'az_az.iso88599e': 'az_AZ.ISO8859-9E',
  686. 'be': 'be_BY.CP1251',
  687. 'be@latin': 'be_BY.UTF-8@latin',
  688. 'be_by': 'be_BY.CP1251',
  689. 'be_by.cp1251': 'be_BY.CP1251',
  690. 'be_by.microsoftcp1251': 'be_BY.CP1251',
  691. 'be_by.utf8@latin': 'be_BY.UTF-8@latin',
  692. 'be_by@latin': 'be_BY.UTF-8@latin',
  693. 'bg': 'bg_BG.CP1251',
  694. 'bg_bg': 'bg_BG.CP1251',
  695. 'bg_bg.cp1251': 'bg_BG.CP1251',
  696. 'bg_bg.iso88595': 'bg_BG.ISO8859-5',
  697. 'bg_bg.koi8r': 'bg_BG.KOI8-R',
  698. 'bg_bg.microsoftcp1251': 'bg_BG.CP1251',
  699. 'bn_in': 'bn_IN.UTF-8',
  700. 'bokmal': 'nb_NO.ISO8859-1',
  701. 'bokm\xe5l': 'nb_NO.ISO8859-1',
  702. 'br': 'br_FR.ISO8859-1',
  703. 'br_fr': 'br_FR.ISO8859-1',
  704. 'br_fr.iso88591': 'br_FR.ISO8859-1',
  705. 'br_fr.iso885914': 'br_FR.ISO8859-14',
  706. 'br_fr.iso885915': 'br_FR.ISO8859-15',
  707. 'br_fr.iso885915@euro': 'br_FR.ISO8859-15',
  708. 'br_fr.utf8@euro': 'br_FR.UTF-8',
  709. 'br_fr@euro': 'br_FR.ISO8859-15',
  710. 'bs': 'bs_BA.ISO8859-2',
  711. 'bs_ba': 'bs_BA.ISO8859-2',
  712. 'bs_ba.iso88592': 'bs_BA.ISO8859-2',
  713. 'bulgarian': 'bg_BG.CP1251',
  714. 'c': 'C',
  715. 'c-french': 'fr_CA.ISO8859-1',
  716. 'c-french.iso88591': 'fr_CA.ISO8859-1',
  717. 'c.en': 'C',
  718. 'c.iso88591': 'en_US.ISO8859-1',
  719. 'c_c': 'C',
  720. 'c_c.c': 'C',
  721. 'ca': 'ca_ES.ISO8859-1',
  722. 'ca_ad': 'ca_AD.ISO8859-1',
  723. 'ca_ad.iso88591': 'ca_AD.ISO8859-1',
  724. 'ca_ad.iso885915': 'ca_AD.ISO8859-15',
  725. 'ca_ad.iso885915@euro': 'ca_AD.ISO8859-15',
  726. 'ca_ad.utf8@euro': 'ca_AD.UTF-8',
  727. 'ca_ad@euro': 'ca_AD.ISO8859-15',
  728. 'ca_es': 'ca_ES.ISO8859-1',
  729. 'ca_es.iso88591': 'ca_ES.ISO8859-1',
  730. 'ca_es.iso885915': 'ca_ES.ISO8859-15',
  731. 'ca_es.iso885915@euro': 'ca_ES.ISO8859-15',
  732. 'ca_es.utf8@euro': 'ca_ES.UTF-8',
  733. 'ca_es@euro': 'ca_ES.ISO8859-15',
  734. 'ca_fr': 'ca_FR.ISO8859-1',
  735. 'ca_fr.iso88591': 'ca_FR.ISO8859-1',
  736. 'ca_fr.iso885915': 'ca_FR.ISO8859-15',
  737. 'ca_fr.iso885915@euro': 'ca_FR.ISO8859-15',
  738. 'ca_fr.utf8@euro': 'ca_FR.UTF-8',
  739. 'ca_fr@euro': 'ca_FR.ISO8859-15',
  740. 'ca_it': 'ca_IT.ISO8859-1',
  741. 'ca_it.iso88591': 'ca_IT.ISO8859-1',
  742. 'ca_it.iso885915': 'ca_IT.ISO8859-15',
  743. 'ca_it.iso885915@euro': 'ca_IT.ISO8859-15',
  744. 'ca_it.utf8@euro': 'ca_IT.UTF-8',
  745. 'ca_it@euro': 'ca_IT.ISO8859-15',
  746. 'catalan': 'ca_ES.ISO8859-1',
  747. 'cextend': 'en_US.ISO8859-1',
  748. 'cextend.en': 'en_US.ISO8859-1',
  749. 'chinese-s': 'zh_CN.eucCN',
  750. 'chinese-t': 'zh_TW.eucTW',
  751. 'croatian': 'hr_HR.ISO8859-2',
  752. 'cs': 'cs_CZ.ISO8859-2',
  753. 'cs_cs': 'cs_CZ.ISO8859-2',
  754. 'cs_cs.iso88592': 'cs_CS.ISO8859-2',
  755. 'cs_cz': 'cs_CZ.ISO8859-2',
  756. 'cs_cz.iso88592': 'cs_CZ.ISO8859-2',
  757. 'cy': 'cy_GB.ISO8859-1',
  758. 'cy_gb': 'cy_GB.ISO8859-1',
  759. 'cy_gb.iso88591': 'cy_GB.ISO8859-1',
  760. 'cy_gb.iso885914': 'cy_GB.ISO8859-14',
  761. 'cy_gb.iso885915': 'cy_GB.ISO8859-15',
  762. 'cy_gb@euro': 'cy_GB.ISO8859-15',
  763. 'cz': 'cs_CZ.ISO8859-2',
  764. 'cz_cz': 'cs_CZ.ISO8859-2',
  765. 'czech': 'cs_CZ.ISO8859-2',
  766. 'da': 'da_DK.ISO8859-1',
  767. 'da.iso885915': 'da_DK.ISO8859-15',
  768. 'da_dk': 'da_DK.ISO8859-1',
  769. 'da_dk.88591': 'da_DK.ISO8859-1',
  770. 'da_dk.885915': 'da_DK.ISO8859-15',
  771. 'da_dk.iso88591': 'da_DK.ISO8859-1',
  772. 'da_dk.iso885915': 'da_DK.ISO8859-15',
  773. 'da_dk@euro': 'da_DK.ISO8859-15',
  774. 'danish': 'da_DK.ISO8859-1',
  775. 'danish.iso88591': 'da_DK.ISO8859-1',
  776. 'dansk': 'da_DK.ISO8859-1',
  777. 'de': 'de_DE.ISO8859-1',
  778. 'de.iso885915': 'de_DE.ISO8859-15',
  779. 'de_at': 'de_AT.ISO8859-1',
  780. 'de_at.iso88591': 'de_AT.ISO8859-1',
  781. 'de_at.iso885915': 'de_AT.ISO8859-15',
  782. 'de_at.iso885915@euro': 'de_AT.ISO8859-15',
  783. 'de_at.utf8@euro': 'de_AT.UTF-8',
  784. 'de_at@euro': 'de_AT.ISO8859-15',
  785. 'de_be': 'de_BE.ISO8859-1',
  786. 'de_be.iso88591': 'de_BE.ISO8859-1',
  787. 'de_be.iso885915': 'de_BE.ISO8859-15',
  788. 'de_be.iso885915@euro': 'de_BE.ISO8859-15',
  789. 'de_be.utf8@euro': 'de_BE.UTF-8',
  790. 'de_be@euro': 'de_BE.ISO8859-15',
  791. 'de_ch': 'de_CH.ISO8859-1',
  792. 'de_ch.iso88591': 'de_CH.ISO8859-1',
  793. 'de_ch.iso885915': 'de_CH.ISO8859-15',
  794. 'de_ch@euro': 'de_CH.ISO8859-15',
  795. 'de_de': 'de_DE.ISO8859-1',
  796. 'de_de.88591': 'de_DE.ISO8859-1',
  797. 'de_de.885915': 'de_DE.ISO8859-15',
  798. 'de_de.885915@euro': 'de_DE.ISO8859-15',
  799. 'de_de.iso88591': 'de_DE.ISO8859-1',
  800. 'de_de.iso885915': 'de_DE.ISO8859-15',
  801. 'de_de.iso885915@euro': 'de_DE.ISO8859-15',
  802. 'de_de.utf8@euro': 'de_DE.UTF-8',
  803. 'de_de@euro': 'de_DE.ISO8859-15',
  804. 'de_lu': 'de_LU.ISO8859-1',
  805. 'de_lu.iso88591': 'de_LU.ISO8859-1',
  806. 'de_lu.iso885915': 'de_LU.ISO8859-15',
  807. 'de_lu.iso885915@euro': 'de_LU.ISO8859-15',
  808. 'de_lu.utf8@euro': 'de_LU.UTF-8',
  809. 'de_lu@euro': 'de_LU.ISO8859-15',
  810. 'deutsch': 'de_DE.ISO8859-1',
  811. 'dutch': 'nl_NL.ISO8859-1',
  812. 'dutch.iso88591': 'nl_BE.ISO8859-1',
  813. 'ee': 'ee_EE.ISO8859-4',
  814. 'ee_ee': 'ee_EE.ISO8859-4',
  815. 'ee_ee.iso88594': 'ee_EE.ISO8859-4',
  816. 'eesti': 'et_EE.ISO8859-1',
  817. 'el': 'el_GR.ISO8859-7',
  818. 'el_gr': 'el_GR.ISO8859-7',
  819. 'el_gr.iso88597': 'el_GR.ISO8859-7',
  820. 'el_gr@euro': 'el_GR.ISO8859-15',
  821. 'en': 'en_US.ISO8859-1',
  822. 'en.iso88591': 'en_US.ISO8859-1',
  823. 'en_au': 'en_AU.ISO8859-1',
  824. 'en_au.iso88591': 'en_AU.ISO8859-1',
  825. 'en_be': 'en_BE.ISO8859-1',
  826. 'en_be@euro': 'en_BE.ISO8859-15',
  827. 'en_bw': 'en_BW.ISO8859-1',
  828. 'en_bw.iso88591': 'en_BW.ISO8859-1',
  829. 'en_ca': 'en_CA.ISO8859-1',
  830. 'en_ca.iso88591': 'en_CA.ISO8859-1',
  831. 'en_gb': 'en_GB.ISO8859-1',
  832. 'en_gb.88591': 'en_GB.ISO8859-1',
  833. 'en_gb.iso88591': 'en_GB.ISO8859-1',
  834. 'en_gb.iso885915': 'en_GB.ISO8859-15',
  835. 'en_gb@euro': 'en_GB.ISO8859-15',
  836. 'en_hk': 'en_HK.ISO8859-1',
  837. 'en_hk.iso88591': 'en_HK.ISO8859-1',
  838. 'en_ie': 'en_IE.ISO8859-1',
  839. 'en_ie.iso88591': 'en_IE.ISO8859-1',
  840. 'en_ie.iso885915': 'en_IE.ISO8859-15',
  841. 'en_ie.iso885915@euro': 'en_IE.ISO8859-15',
  842. 'en_ie.utf8@euro': 'en_IE.UTF-8',
  843. 'en_ie@euro': 'en_IE.ISO8859-15',
  844. 'en_in': 'en_IN.ISO8859-1',
  845. 'en_nz': 'en_NZ.ISO8859-1',
  846. 'en_nz.iso88591': 'en_NZ.ISO8859-1',
  847. 'en_ph': 'en_PH.ISO8859-1',
  848. 'en_ph.iso88591': 'en_PH.ISO8859-1',
  849. 'en_sg': 'en_SG.ISO8859-1',
  850. 'en_sg.iso88591': 'en_SG.ISO8859-1',
  851. 'en_uk': 'en_GB.ISO8859-1',
  852. 'en_us': 'en_US.ISO8859-1',
  853. 'en_us.88591': 'en_US.ISO8859-1',
  854. 'en_us.885915': 'en_US.ISO8859-15',
  855. 'en_us.iso88591': 'en_US.ISO8859-1',
  856. 'en_us.iso885915': 'en_US.ISO8859-15',
  857. 'en_us.iso885915@euro': 'en_US.ISO8859-15',
  858. 'en_us@euro': 'en_US.ISO8859-15',
  859. 'en_us@euro@euro': 'en_US.ISO8859-15',
  860. 'en_za': 'en_ZA.ISO8859-1',
  861. 'en_za.88591': 'en_ZA.ISO8859-1',
  862. 'en_za.iso88591': 'en_ZA.ISO8859-1',
  863. 'en_za.iso885915': 'en_ZA.ISO8859-15',
  864. 'en_za@euro': 'en_ZA.ISO8859-15',
  865. 'en_zw': 'en_ZW.ISO8859-1',
  866. 'en_zw.iso88591': 'en_ZW.ISO8859-1',
  867. 'eng_gb': 'en_GB.ISO8859-1',
  868. 'eng_gb.8859': 'en_GB.ISO8859-1',
  869. 'english': 'en_EN.ISO8859-1',
  870. 'english.iso88591': 'en_EN.ISO8859-1',
  871. 'english_uk': 'en_GB.ISO8859-1',
  872. 'english_uk.8859': 'en_GB.ISO8859-1',
  873. 'english_united-states': 'en_US.ISO8859-1',
  874. 'english_united-states.437': 'C',
  875. 'english_us': 'en_US.ISO8859-1',
  876. 'english_us.8859': 'en_US.ISO8859-1',
  877. 'english_us.ascii': 'en_US.ISO8859-1',
  878. 'eo': 'eo_XX.ISO8859-3',
  879. 'eo_eo': 'eo_EO.ISO8859-3',
  880. 'eo_eo.iso88593': 'eo_EO.ISO8859-3',
  881. 'eo_xx': 'eo_XX.ISO8859-3',
  882. 'eo_xx.iso88593': 'eo_XX.ISO8859-3',
  883. 'es': 'es_ES.ISO8859-1',
  884. 'es_ar': 'es_AR.ISO8859-1',
  885. 'es_ar.iso88591': 'es_AR.ISO8859-1',
  886. 'es_bo': 'es_BO.ISO8859-1',
  887. 'es_bo.iso88591': 'es_BO.ISO8859-1',
  888. 'es_cl': 'es_CL.ISO8859-1',
  889. 'es_cl.iso88591': 'es_CL.ISO8859-1',
  890. 'es_co': 'es_CO.ISO8859-1',
  891. 'es_co.iso88591': 'es_CO.ISO8859-1',
  892. 'es_cr': 'es_CR.ISO8859-1',
  893. 'es_cr.iso88591': 'es_CR.ISO8859-1',
  894. 'es_do': 'es_DO.ISO8859-1',
  895. 'es_do.iso88591': 'es_DO.ISO8859-1',
  896. 'es_ec': 'es_EC.ISO8859-1',
  897. 'es_ec.iso88591': 'es_EC.ISO8859-1',
  898. 'es_es': 'es_ES.ISO8859-1',
  899. 'es_es.88591': 'es_ES.ISO8859-1',
  900. 'es_es.iso88591': 'es_ES.ISO8859-1',
  901. 'es_es.iso885915': 'es_ES.ISO8859-15',
  902. 'es_es.iso885915@euro': 'es_ES.ISO8859-15',
  903. 'es_es.utf8@euro': 'es_ES.UTF-8',
  904. 'es_es@euro': 'es_ES.ISO8859-15',
  905. 'es_gt': 'es_GT.ISO8859-1',
  906. 'es_gt.iso88591': 'es_GT.ISO8859-1',
  907. 'es_hn': 'es_HN.ISO8859-1',
  908. 'es_hn.iso88591': 'es_HN.ISO8859-1',
  909. 'es_mx': 'es_MX.ISO8859-1',
  910. 'es_mx.iso88591': 'es_MX.ISO8859-1',
  911. 'es_ni': 'es_NI.ISO8859-1',
  912. 'es_ni.iso88591': 'es_NI.ISO8859-1',
  913. 'es_pa': 'es_PA.ISO8859-1',
  914. 'es_pa.iso88591': 'es_PA.ISO8859-1',
  915. 'es_pa.iso885915': 'es_PA.ISO8859-15',
  916. 'es_pa@euro': 'es_PA.ISO8859-15',
  917. 'es_pe': 'es_PE.ISO8859-1',
  918. 'es_pe.iso88591': 'es_PE.ISO8859-1',
  919. 'es_pe.iso885915': 'es_PE.ISO8859-15',
  920. 'es_pe@euro': 'es_PE.ISO8859-15',
  921. 'es_pr': 'es_PR.ISO8859-1',
  922. 'es_pr.iso88591': 'es_PR.ISO8859-1',
  923. 'es_py': 'es_PY.ISO8859-1',
  924. 'es_py.iso88591': 'es_PY.ISO8859-1',
  925. 'es_py.iso885915': 'es_PY.ISO8859-15',
  926. 'es_py@euro': 'es_PY.ISO8859-15',
  927. 'es_sv': 'es_SV.ISO8859-1',
  928. 'es_sv.iso88591': 'es_SV.ISO8859-1',
  929. 'es_sv.iso885915': 'es_SV.ISO8859-15',
  930. 'es_sv@euro': 'es_SV.ISO8859-15',
  931. 'es_us': 'es_US.ISO8859-1',
  932. 'es_us.iso88591': 'es_US.ISO8859-1',
  933. 'es_uy': 'es_UY.ISO8859-1',
  934. 'es_uy.iso88591': 'es_UY.ISO8859-1',
  935. 'es_uy.iso885915': 'es_UY.ISO8859-15',
  936. 'es_uy@euro': 'es_UY.ISO8859-15',
  937. 'es_ve': 'es_VE.ISO8859-1',
  938. 'es_ve.iso88591': 'es_VE.ISO8859-1',
  939. 'es_ve.iso885915': 'es_VE.ISO8859-15',
  940. 'es_ve@euro': 'es_VE.ISO8859-15',
  941. 'estonian': 'et_EE.ISO8859-1',
  942. 'et': 'et_EE.ISO8859-15',
  943. 'et_ee': 'et_EE.ISO8859-15',
  944. 'et_ee.iso88591': 'et_EE.ISO8859-1',
  945. 'et_ee.iso885913': 'et_EE.ISO8859-13',
  946. 'et_ee.iso885915': 'et_EE.ISO8859-15',
  947. 'et_ee.iso88594': 'et_EE.ISO8859-4',
  948. 'et_ee@euro': 'et_EE.ISO8859-15',
  949. 'eu': 'eu_ES.ISO8859-1',
  950. 'eu_es': 'eu_ES.ISO8859-1',
  951. 'eu_es.iso88591': 'eu_ES.ISO8859-1',
  952. 'eu_es.iso885915': 'eu_ES.ISO8859-15',
  953. 'eu_es.iso885915@euro': 'eu_ES.ISO8859-15',
  954. 'eu_es.utf8@euro': 'eu_ES.UTF-8',
  955. 'eu_es@euro': 'eu_ES.ISO8859-15',
  956. 'fa': 'fa_IR.UTF-8',
  957. 'fa_ir': 'fa_IR.UTF-8',
  958. 'fa_ir.isiri3342': 'fa_IR.ISIRI-3342',
  959. 'fi': 'fi_FI.ISO8859-15',
  960. 'fi.iso885915': 'fi_FI.ISO8859-15',
  961. 'fi_fi': 'fi_FI.ISO8859-15',
  962. 'fi_fi.88591': 'fi_FI.ISO8859-1',
  963. 'fi_fi.iso88591': 'fi_FI.ISO8859-1',
  964. 'fi_fi.iso885915': 'fi_FI.ISO8859-15',
  965. 'fi_fi.iso885915@euro': 'fi_FI.ISO8859-15',
  966. 'fi_fi.utf8@euro': 'fi_FI.UTF-8',
  967. 'fi_fi@euro': 'fi_FI.ISO8859-15',
  968. 'finnish': 'fi_FI.ISO8859-1',
  969. 'finnish.iso88591': 'fi_FI.ISO8859-1',
  970. 'fo': 'fo_FO.ISO8859-1',
  971. 'fo_fo': 'fo_FO.ISO8859-1',
  972. 'fo_fo.iso88591': 'fo_FO.ISO8859-1',
  973. 'fo_fo.iso885915': 'fo_FO.ISO8859-15',
  974. 'fo_fo@euro': 'fo_FO.ISO8859-15',
  975. 'fr': 'fr_FR.ISO8859-1',
  976. 'fr.iso885915': 'fr_FR.ISO8859-15',
  977. 'fr_be': 'fr_BE.ISO8859-1',
  978. 'fr_be.88591': 'fr_BE.ISO8859-1',
  979. 'fr_be.iso88591': 'fr_BE.ISO8859-1',
  980. 'fr_be.iso885915': 'fr_BE.ISO8859-15',
  981. 'fr_be.iso885915@euro': 'fr_BE.ISO8859-15',
  982. 'fr_be.utf8@euro': 'fr_BE.UTF-8',
  983. 'fr_be@euro': 'fr_BE.ISO8859-15',
  984. 'fr_ca': 'fr_CA.ISO8859-1',
  985. 'fr_ca.88591': 'fr_CA.ISO8859-1',
  986. 'fr_ca.iso88591': 'fr_CA.ISO8859-1',
  987. 'fr_ca.iso885915': 'fr_CA.ISO8859-15',
  988. 'fr_ca@euro': 'fr_CA.ISO8859-15',
  989. 'fr_ch': 'fr_CH.ISO8859-1',
  990. 'fr_ch.88591': 'fr_CH.ISO8859-1',
  991. 'fr_ch.iso88591': 'fr_CH.ISO8859-1',
  992. 'fr_ch.iso885915': 'fr_CH.ISO8859-15',
  993. 'fr_ch@euro': 'fr_CH.ISO8859-15',
  994. 'fr_fr': 'fr_FR.ISO8859-1',
  995. 'fr_fr.88591': 'fr_FR.ISO8859-1',
  996. 'fr_fr.iso88591': 'fr_FR.ISO8859-1',
  997. 'fr_fr.iso885915': 'fr_FR.ISO8859-15',
  998. 'fr_fr.iso885915@euro': 'fr_FR.ISO8859-15',
  999. 'fr_fr.utf8@euro': 'fr_FR.UTF-8',
  1000. 'fr_fr@euro': 'fr_FR.ISO8859-15',
  1001. 'fr_lu': 'fr_LU.ISO8859-1',
  1002. 'fr_lu.88591': 'fr_LU.ISO8859-1',
  1003. 'fr_lu.iso88591': 'fr_LU.ISO8859-1',
  1004. 'fr_lu.iso885915': 'fr_LU.ISO8859-15',
  1005. 'fr_lu.iso885915@euro': 'fr_LU.ISO8859-15',
  1006. 'fr_lu.utf8@euro': 'fr_LU.UTF-8',
  1007. 'fr_lu@euro': 'fr_LU.ISO8859-15',
  1008. 'fran\xe7ais': 'fr_FR.ISO8859-1',
  1009. 'fre_fr': 'fr_FR.ISO8859-1',
  1010. 'fre_fr.8859': 'fr_FR.ISO8859-1',
  1011. 'french': 'fr_FR.ISO8859-1',
  1012. 'french.iso88591': 'fr_CH.ISO8859-1',
  1013. 'french_france': 'fr_FR.ISO8859-1',
  1014. 'french_france.8859': 'fr_FR.ISO8859-1',
  1015. 'ga':

Large files files are truncated, but you can click here to view the full file