1edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep""" Locale support.
2edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
3edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    The module provides low-level access to the C lib's locale APIs
4edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    and adds high level number formatting APIs as well as a locale
5edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    aliasing engine to complement these.
6edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
7edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    The aliasing engine includes support for many commonly used locale
8edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    names and maps them to values suitable for passing to the C lib's
9edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    setlocale() function. It also includes default encodings for all
10edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    supported locale names.
11edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
12edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep"""
13edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
14edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepimport sys
15edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepimport encodings
16edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepimport encodings.aliases
17edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepimport re
18edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepimport operator
19edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepimport functools
20edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
21edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoeptry:
22edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    _unicode = unicode
23edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepexcept NameError:
24edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # If Python is built without Unicode support, the unicode type
25edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # will not exist. Fake one.
26edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    class _unicode(object):
27edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        pass
28edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
29edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Try importing the _locale module.
30edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
31edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# If this fails, fall back on a basic 'C' locale emulation.
32edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
33edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Yuck:  LC_MESSAGES is non-standard:  can't tell whether it exists before
34edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# trying the import.  So __all__ is also fiddled at the end of the file.
35edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep__all__ = ["getlocale", "getdefaultlocale", "getpreferredencoding", "Error",
36edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep           "setlocale", "resetlocale", "localeconv", "strcoll", "strxfrm",
37edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep           "str", "atof", "atoi", "format", "format_string", "currency",
38edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep           "normalize", "LC_CTYPE", "LC_COLLATE", "LC_TIME", "LC_MONETARY",
39edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep           "LC_NUMERIC", "LC_ALL", "CHAR_MAX"]
40edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
41edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoeptry:
42edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
43edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    from _locale import *
44edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
45edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepexcept ImportError:
46edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
47edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # Locale emulation
48edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
49edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    CHAR_MAX = 127
50edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_ALL = 6
51edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_COLLATE = 3
52edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_CTYPE = 0
53edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_MESSAGES = 5
54edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_MONETARY = 4
55edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_NUMERIC = 1
56edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_TIME = 2
57edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    Error = ValueError
58edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
59edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    def localeconv():
60edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """ localeconv() -> dict.
61edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            Returns numeric and monetary locale-specific parameters.
62edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """
63edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # 'C' locale default values
64edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return {'grouping': [127],
65edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'currency_symbol': '',
66edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'n_sign_posn': 127,
67edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'p_cs_precedes': 127,
68edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'n_cs_precedes': 127,
69edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'mon_grouping': [],
70edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'n_sep_by_space': 127,
71edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'decimal_point': '.',
72edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'negative_sign': '',
73edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'positive_sign': '',
74edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'p_sep_by_space': 127,
75edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'int_curr_symbol': '',
76edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'p_sign_posn': 127,
77edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'thousands_sep': '',
78edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'mon_thousands_sep': '',
79edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'frac_digits': 127,
80edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'mon_decimal_point': '',
81edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                'int_frac_digits': 127}
82edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
83edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    def setlocale(category, value=None):
84edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """ setlocale(integer,string=None) -> string.
85edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            Activates/queries locale processing.
86edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """
87edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if value not in (None, '', 'C'):
88edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            raise Error, '_locale emulation only supports "C" locale'
89edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return 'C'
90edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
91edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    def strcoll(a,b):
92edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """ strcoll(string,string) -> int.
93edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            Compares two strings according to the locale.
94edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """
95edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return cmp(a,b)
96edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
97edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    def strxfrm(s):
98edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """ strxfrm(string) -> string.
99edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            Returns a string that behaves for cmp locale-aware.
100edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """
101edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return s
102edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
103edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
104edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep_localeconv = localeconv
105edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
106edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# With this dict, you can override some items of localeconv's return value.
107edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# This is useful for testing purposes.
108edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep_override_localeconv = {}
109edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
110edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep@functools.wraps(_localeconv)
111edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef localeconv():
112edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    d = _localeconv()
113edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if _override_localeconv:
114edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        d.update(_override_localeconv)
115edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return d
116edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
117edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
118edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep### Number formatting APIs
119edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
120edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Author: Martin von Loewis
121edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# improved by Georg Brandl
122edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
123edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Iterate over grouping intervals
124edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _grouping_intervals(grouping):
125edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    last_interval = None
126edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    for interval in grouping:
127edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # if grouping is -1, we are done
128edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if interval == CHAR_MAX:
129edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            return
130edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # 0: re-use last group ad infinitum
131edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if interval == 0:
132edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            if last_interval is None:
133edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                raise ValueError("invalid grouping")
134edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            while True:
135edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                yield last_interval
136edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        yield interval
137edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        last_interval = interval
138edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
139edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#perform the grouping from right to left
140edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _group(s, monetary=False):
141edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    conv = localeconv()
142edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    thousands_sep = conv[monetary and 'mon_thousands_sep' or 'thousands_sep']
143edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    grouping = conv[monetary and 'mon_grouping' or 'grouping']
144edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if not grouping:
145edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return (s, 0)
146edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if s[-1] == ' ':
147edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        stripped = s.rstrip()
148edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        right_spaces = s[len(stripped):]
149edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = stripped
150edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
151edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        right_spaces = ''
152edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    left_spaces = ''
153edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    groups = []
154edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    for interval in _grouping_intervals(grouping):
155edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if not s or s[-1] not in "0123456789":
156edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            # only non-digit characters remain (sign, spaces)
157edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            left_spaces = s
158edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            s = ''
159edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            break
160edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        groups.append(s[-interval:])
161edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = s[:-interval]
162edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if s:
163edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        groups.append(s)
164edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    groups.reverse()
165edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return (
166edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        left_spaces + thousands_sep.join(groups) + right_spaces,
167edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        len(thousands_sep) * (len(groups) - 1)
168edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    )
169edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
170edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Strip a given amount of excess padding from the given string
171edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _strip_padding(s, amount):
172edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    lpos = 0
173edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    while amount and s[lpos] == ' ':
174edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        lpos += 1
175edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        amount -= 1
176edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    rpos = len(s) - 1
177edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    while amount and s[rpos] == ' ':
178edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        rpos -= 1
179edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        amount -= 1
180edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return s[lpos:rpos+1]
181edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
182edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep_percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?'
183edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                         r'(?P<modifiers>[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]')
184edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
185edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef format(percent, value, grouping=False, monetary=False, *additional):
186edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """Returns the locale-aware substitution of a %? specifier
187edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    (percent).
188edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
189edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    additional is for format strings which contain one or more
190edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    '*' modifiers."""
191edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # this is only for one-percent-specifier strings and this should be checked
192edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    match = _percent_re.match(percent)
193edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if not match or len(match.group())!= len(percent):
194edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        raise ValueError(("format() must be given exactly one %%char "
195edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                         "format specifier, %s not valid") % repr(percent))
196edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return _format(percent, value, grouping, monetary, *additional)
197edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
198edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _format(percent, value, grouping=False, monetary=False, *additional):
199edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if additional:
200edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        formatted = percent % ((value,) + additional)
201edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
202edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        formatted = percent % value
203edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # floats and decimal ints need special action!
204edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if percent[-1] in 'eEfFgG':
205edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        seps = 0
206edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        parts = formatted.split('.')
207edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if grouping:
208edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            parts[0], seps = _group(parts[0], monetary=monetary)
209edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        decimal_point = localeconv()[monetary and 'mon_decimal_point'
210edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                              or 'decimal_point']
211edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        formatted = decimal_point.join(parts)
212edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if seps:
213edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            formatted = _strip_padding(formatted, seps)
214edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    elif percent[-1] in 'diu':
215edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        seps = 0
216edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if grouping:
217edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            formatted, seps = _group(formatted, monetary=monetary)
218edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if seps:
219edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            formatted = _strip_padding(formatted, seps)
220edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return formatted
221edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
222edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef format_string(f, val, grouping=False):
223edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """Formats a string in the same way that the % formatting would use,
224edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    but takes the current locale into account.
225edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    Grouping is applied if the third parameter is true."""
226edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    percents = list(_percent_re.finditer(f))
227edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    new_f = _percent_re.sub('%s', f)
228edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
229edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if operator.isMappingType(val):
230edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        new_val = []
231edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        for perc in percents:
232edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            if perc.group()[-1]=='%':
233edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                new_val.append('%')
234edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            else:
235edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                new_val.append(format(perc.group(), val, grouping))
236edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
237edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if not isinstance(val, tuple):
238edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            val = (val,)
239edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        new_val = []
240edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        i = 0
241edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        for perc in percents:
242edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            if perc.group()[-1]=='%':
243edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                new_val.append('%')
244edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            else:
245edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                starcount = perc.group('modifiers').count('*')
246edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                new_val.append(_format(perc.group(),
247edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                      val[i],
248edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                      grouping,
249edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                      False,
250edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                      *val[i+1:i+1+starcount]))
251edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                i += (1 + starcount)
252edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    val = tuple(new_val)
253edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
254edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return new_f % val
255edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
256edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef currency(val, symbol=True, grouping=False, international=False):
257edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """Formats val according to the currency settings
258edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    in the current locale."""
259edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    conv = localeconv()
260edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
261edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # check for illegal values
262edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    digits = conv[international and 'int_frac_digits' or 'frac_digits']
263edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if digits == 127:
264edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        raise ValueError("Currency formatting is not possible using "
265edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                         "the 'C' locale.")
266edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
267edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    s = format('%%.%if' % digits, abs(val), grouping, monetary=True)
268edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # '<' and '>' are markers if the sign must be inserted between symbol and value
269edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    s = '<' + s + '>'
270edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
271edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if symbol:
272edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        smb = conv[international and 'int_curr_symbol' or 'currency_symbol']
273edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        precedes = conv[val<0 and 'n_cs_precedes' or 'p_cs_precedes']
274edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        separated = conv[val<0 and 'n_sep_by_space' or 'p_sep_by_space']
275edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
276edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if precedes:
277edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            s = smb + (separated and ' ' or '') + s
278edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        else:
279edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            s = s + (separated and ' ' or '') + smb
280edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
281edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    sign_pos = conv[val<0 and 'n_sign_posn' or 'p_sign_posn']
282edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    sign = conv[val<0 and 'negative_sign' or 'positive_sign']
283edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
284edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if sign_pos == 0:
285edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = '(' + s + ')'
286edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    elif sign_pos == 1:
287edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = sign + s
288edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    elif sign_pos == 2:
289edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = s + sign
290edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    elif sign_pos == 3:
291edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = s.replace('<', sign)
292edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    elif sign_pos == 4:
293edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = s.replace('>', sign)
294edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
295edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # the default if nothing specified;
296edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # this should be the most fitting sign position
297edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        s = sign + s
298edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
299edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return s.replace('<', '').replace('>', '')
300edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
301edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef str(val):
302edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """Convert float to integer, taking the locale into account."""
303edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return format("%.12g", val)
304edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
305edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef atof(string, func=float):
306edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    "Parses a string as a float according to the locale settings."
307edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    #First, get rid of the grouping
308edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    ts = localeconv()['thousands_sep']
309edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if ts:
310edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        string = string.replace(ts, '')
311edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    #next, replace the decimal point with a dot
312edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    dd = localeconv()['decimal_point']
313edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if dd:
314edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        string = string.replace(dd, '.')
315edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    #finally, parse the string
316edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return func(string)
317edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
318edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef atoi(str):
319edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    "Converts a string to an integer according to the locale settings."
320edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return atof(str, int)
321edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
322edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _test():
323edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    setlocale(LC_ALL, "")
324edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    #do grouping
325edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    s1 = format("%d", 123456789,1)
326edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print s1, "is", atoi(s1)
327edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    #standard formatting
328edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    s1 = str(3.14)
329edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print s1, "is", atof(s1)
330edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
331edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep### Locale name aliasing engine
332edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
333edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Author: Marc-Andre Lemburg, mal@lemburg.com
334edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Various tweaks by Fredrik Lundh <fredrik@pythonware.com>
335edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
336edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# store away the low-level version of setlocale (it's
337edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# overridden below)
338edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep_setlocale = setlocale
339edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
340edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Avoid relying on the locale-dependent .lower() method
341edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# (see issue #1813).
342edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep_ascii_lower_map = ''.join(
343edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    chr(x + 32 if x >= ord('A') and x <= ord('Z') else x)
344edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    for x in range(256)
345edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep)
346edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
347edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef normalize(localename):
348edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
349edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Returns a normalized locale code for the given locale
350edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        name.
351edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
352edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        The returned locale code is formatted for use with
353edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        setlocale().
354edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
355edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        If normalization fails, the original name is returned
356edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        unchanged.
357edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
358edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        If the given encoding is not known, the function defaults to
359edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        the default encoding for the locale code just like setlocale()
360edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        does.
361edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
362edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
363edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # Normalize the locale name and extract the encoding
364edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if isinstance(localename, _unicode):
365edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        localename = localename.encode('ascii')
366edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    fullname = localename.translate(_ascii_lower_map)
367edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if ':' in fullname:
368edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # ':' is sometimes used as encoding delimiter.
369edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        fullname = fullname.replace(':', '.')
370edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if '.' in fullname:
371edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        langname, encoding = fullname.split('.')[:2]
372edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        fullname = langname + '.' + encoding
373edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
374edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        langname = fullname
375edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        encoding = ''
376edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
377edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # First lookup: fullname (possibly with encoding)
378edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    norm_encoding = encoding.replace('-', '')
379edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    norm_encoding = norm_encoding.replace('_', '')
380edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    lookup_name = langname + '.' + encoding
381edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    code = locale_alias.get(lookup_name, None)
382edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if code is not None:
383edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return code
384edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    #print 'first lookup failed'
385edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
386edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # Second try: langname (without encoding)
387edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    code = locale_alias.get(langname, None)
388edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if code is not None:
389edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        #print 'langname lookup succeeded'
390edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if '.' in code:
391edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            langname, defenc = code.split('.')
392edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        else:
393edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            langname = code
394edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            defenc = ''
395edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if encoding:
396edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            # Convert the encoding to a C lib compatible encoding string
397edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            norm_encoding = encodings.normalize_encoding(encoding)
398edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            #print 'norm encoding: %r' % norm_encoding
399edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            norm_encoding = encodings.aliases.aliases.get(norm_encoding,
400edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                                          norm_encoding)
401edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            #print 'aliased encoding: %r' % norm_encoding
402edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            encoding = locale_encoding_alias.get(norm_encoding,
403edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                                                 norm_encoding)
404edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        else:
405edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            encoding = defenc
406edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        #print 'found encoding %r' % encoding
407edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if encoding:
408edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            return langname + '.' + encoding
409edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        else:
410edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            return langname
411edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
412edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
413edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return localename
414edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
415edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _parse_localename(localename):
416edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
417edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Parses the locale code for localename and returns the
418edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        result as tuple (language code, encoding).
419edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
420edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        The localename is normalized and passed through the locale
421edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        alias engine. A ValueError is raised in case the locale name
422edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        cannot be parsed.
423edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
424edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        The language code corresponds to RFC 1766.  code and encoding
425edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        can be None in case the values cannot be determined or are
426edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        unknown to this implementation.
427edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
428edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
429edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    code = normalize(localename)
430edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if '@' in code:
431edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # Deal with locale modifiers
432edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        code, modifier = code.split('@')
433edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if modifier == 'euro' and '.' not in code:
434edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            # Assume Latin-9 for @euro locales. This is bogus,
435edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            # since some systems may use other encodings for these
436edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            # locales. Also, we ignore other modifiers.
437edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            return code, 'iso-8859-15'
438edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
439edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if '.' in code:
440edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return tuple(code.split('.')[:2])
441edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    elif code == 'C':
442edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return None, None
443edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    raise ValueError, 'unknown locale: %s' % localename
444edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
445edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _build_localename(localetuple):
446edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
447edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Builds a locale code from the given tuple (language code,
448edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        encoding).
449edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
450edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        No aliasing or normalizing takes place.
451edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
452edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
453edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    language, encoding = localetuple
454edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if language is None:
455edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        language = 'C'
456edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if encoding is None:
457edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return language
458edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
459edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return language + '.' + encoding
460edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
461edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')):
462edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
463edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Tries to determine the default locale settings and returns
464edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        them as tuple (language code, encoding).
465edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
466edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        According to POSIX, a program which has not called
467edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        setlocale(LC_ALL, "") runs using the portable 'C' locale.
468edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        Calling setlocale(LC_ALL, "") lets it use the default locale as
469edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        defined by the LANG variable. Since we don't want to interfere
470edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        with the current locale setting we thus emulate the behavior
471edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        in the way described above.
472edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
473edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        To maintain compatibility with other platforms, not only the
474edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        LANG variable is tested, but a list of variables given as
475edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        envvars parameter. The first found to be defined will be
476edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        used. envvars defaults to the search path used in GNU gettext;
477edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        it must always contain the variable name 'LANG'.
478edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
479edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        Except for the code 'C', the language code corresponds to RFC
480edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        1766.  code and encoding can be None in case the values cannot
481edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        be determined.
482edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
483edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
484edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
485edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    try:
486edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # check if it's supported by the _locale module
487edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        import _locale
488edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        code, encoding = _locale._getdefaultlocale()
489edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    except (ImportError, AttributeError):
490edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        pass
491edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
492edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # make sure the code/encoding values are valid
493edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if sys.platform == "win32" and code and code[:2] == "0x":
494edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            # map windows language identifier to language name
495edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            code = windows_locale.get(int(code, 0))
496edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # ...add other platform-specific processing here, if
497edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # necessary...
498edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return code, encoding
499edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
500edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # fall back on POSIX behaviour
501edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    import os
502edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    lookup = os.environ.get
503edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    for variable in envvars:
504edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        localename = lookup(variable,None)
505edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        if localename:
506edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            if variable == 'LANGUAGE':
507edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                localename = localename.split(':')[0]
508edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            break
509edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
510edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        localename = 'C'
511edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return _parse_localename(localename)
512edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
513edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
514edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef getlocale(category=LC_CTYPE):
515edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
516edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Returns the current setting for the given locale category as
517edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        tuple (language code, encoding).
518edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
519edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        category may be one of the LC_* value except LC_ALL. It
520edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        defaults to LC_CTYPE.
521edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
522edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        Except for the code 'C', the language code corresponds to RFC
523edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        1766.  code and encoding can be None in case the values cannot
524edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        be determined.
525edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
526edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
527edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    localename = _setlocale(category)
528edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if category == LC_ALL and ';' in localename:
529edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        raise TypeError, 'category LC_ALL is not supported'
530edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return _parse_localename(localename)
531edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
532edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef setlocale(category, locale=None):
533edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
534edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Set the locale for the given category.  The locale can be
535edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        a string, an iterable of two strings (language code and encoding),
536edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        or None.
537edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
538edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        Iterables are converted to strings using the locale aliasing
539edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        engine.  Locale strings are passed directly to the C lib.
540edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
541edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        category may be given as one of the LC_* values.
542edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
543edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
544edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    if locale and type(locale) is not type(""):
545edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # convert to string
546edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        locale = normalize(_build_localename(locale))
547edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    return _setlocale(category, locale)
548edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
549edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef resetlocale(category=LC_ALL):
550edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
551edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Sets the locale for category to the default setting.
552edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
553edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        The default setting is determined by calling
554edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        getdefaultlocale(). category defaults to LC_ALL.
555edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
556edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
557edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    _setlocale(category, _build_localename(getdefaultlocale()))
558edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
559edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepif sys.platform.startswith("win"):
560edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # On Win32, this will return the ANSI code page
561edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    def getpreferredencoding(do_setlocale = True):
562edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        """Return the charset that the user is likely using."""
563edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        import _locale
564edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        return _locale._getdefaultlocale()[1]
565edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepelse:
566edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # On Unix, if CODESET is available, use that.
567edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    try:
568edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        CODESET
569edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    except NameError:
570edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        # Fall back to parsing environment variables :-(
571edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        def getpreferredencoding(do_setlocale = True):
572edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            """Return the charset that the user is likely using,
573edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            by looking at environment variables."""
574edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            return getdefaultlocale()[1]
575edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
576edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        def getpreferredencoding(do_setlocale = True):
577edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            """Return the charset that the user is likely using,
578edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            according to the system configuration."""
579edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            if do_setlocale:
580edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                oldloc = setlocale(LC_CTYPE)
581edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                try:
582edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                    setlocale(LC_CTYPE, "")
583edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                except Error:
584edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                    pass
585edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                result = nl_langinfo(CODESET)
586edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                setlocale(LC_CTYPE, oldloc)
587edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                return result
588edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            else:
589edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                return nl_langinfo(CODESET)
590edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
591edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
592edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep### Database
593edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
594edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# The following data was extracted from the locale.alias file which
595edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# comes with X11 and then hand edited removing the explicit encoding
596edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# definitions and adding some more aliases. The file is usually
597edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# available as /usr/lib/X11/locale/locale.alias.
598edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
599edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
600edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
601edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# The local_encoding_alias table maps lowercase encoding alias names
602edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# to C locale encoding names (case-sensitive). Note that normalize()
603edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# first looks up the encoding in the encodings.aliases dictionary and
604edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# then applies this mapping to find the correct C lib name for the
605edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# encoding.
606edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
607edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoeplocale_encoding_alias = {
608edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
609edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # Mappings for non-standard encoding names used in locale names
610edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    '437':                          'C',
611edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c':                            'C',
612edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en':                           'ISO8859-1',
613edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'jis':                          'JIS7',
614edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'jis7':                         'JIS7',
615edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ajec':                         'eucJP',
616edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
617edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # Mappings from Python codec names to C lib encoding names
618edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ascii':                        'ISO8859-1',
619edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'latin_1':                      'ISO8859-1',
620edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_1':                    'ISO8859-1',
621edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_10':                   'ISO8859-10',
622edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_11':                   'ISO8859-11',
623edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_13':                   'ISO8859-13',
624edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_14':                   'ISO8859-14',
625edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_15':                   'ISO8859-15',
626edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_16':                   'ISO8859-16',
627edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_2':                    'ISO8859-2',
628edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_3':                    'ISO8859-3',
629edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_4':                    'ISO8859-4',
630edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_5':                    'ISO8859-5',
631edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_6':                    'ISO8859-6',
632edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_7':                    'ISO8859-7',
633edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_8':                    'ISO8859-8',
634edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859_9':                    'ISO8859-9',
635edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso2022_jp':                   'JIS7',
636edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'shift_jis':                    'SJIS',
637edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tactis':                       'TACTIS',
638edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'euc_jp':                       'eucJP',
639edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'euc_kr':                       'eucKR',
640edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'utf_8':                        'UTF-8',
641edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'koi8_r':                       'KOI8-R',
642edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'koi8_u':                       'KOI8-U',
643edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # XXX This list is still incomplete. If you know more
644edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    # mappings, please file a bug report. Thanks.
645edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep}
646edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
647edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
648edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# The locale_alias table maps lowercase alias names to C locale names
649edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# (case-sensitive). Encodings are always separated from the locale
650edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# name using a dot ('.'); they should only be given in case the
651edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# language name is needed to interpret the given encoding alias
652edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# correctly (CJK codes often have this need).
653edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
654edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Note that the normalize() function which uses this tables
655edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# removes '_' and '-' characters from the encoding part of the
656edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# locale name before doing the lookup. This saves a lot of
657edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# space in the table.
658edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
659edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# MAL 2004-12-10:
660edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Updated alias mapping to most recent locale.alias file
661edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# from X.org distribution using makelocalealias.py.
662edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
663edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# These are the differences compared to the old mapping (Python 2.4
664edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# and older):
665edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
666edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'bg' -> 'bg_BG.ISO8859-5' to 'bg_BG.CP1251'
667edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'bg_bg' -> 'bg_BG.ISO8859-5' to 'bg_BG.CP1251'
668edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'bulgarian' -> 'bg_BG.ISO8859-5' to 'bg_BG.CP1251'
669edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'cz' -> 'cz_CZ.ISO8859-2' to 'cs_CZ.ISO8859-2'
670edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'cz_cz' -> 'cz_CZ.ISO8859-2' to 'cs_CZ.ISO8859-2'
671edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'czech' -> 'cs_CS.ISO8859-2' to 'cs_CZ.ISO8859-2'
672edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'dutch' -> 'nl_BE.ISO8859-1' to 'nl_NL.ISO8859-1'
673edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'et' -> 'et_EE.ISO8859-4' to 'et_EE.ISO8859-15'
674edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'et_ee' -> 'et_EE.ISO8859-4' to 'et_EE.ISO8859-15'
675edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'fi' -> 'fi_FI.ISO8859-1' to 'fi_FI.ISO8859-15'
676edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'fi_fi' -> 'fi_FI.ISO8859-1' to 'fi_FI.ISO8859-15'
677edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'iw' -> 'iw_IL.ISO8859-8' to 'he_IL.ISO8859-8'
678edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'iw_il' -> 'iw_IL.ISO8859-8' to 'he_IL.ISO8859-8'
679edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'japanese' -> 'ja_JP.SJIS' to 'ja_JP.eucJP'
680edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'lt' -> 'lt_LT.ISO8859-4' to 'lt_LT.ISO8859-13'
681edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'lv' -> 'lv_LV.ISO8859-4' to 'lv_LV.ISO8859-13'
682edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sl' -> 'sl_CS.ISO8859-2' to 'sl_SI.ISO8859-2'
683edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'slovene' -> 'sl_CS.ISO8859-2' to 'sl_SI.ISO8859-2'
684edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'th_th' -> 'th_TH.TACTIS' to 'th_TH.ISO8859-11'
685edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'zh_cn' -> 'zh_CN.eucCN' to 'zh_CN.gb2312'
686edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'zh_cn.big5' -> 'zh_TW.eucTW' to 'zh_TW.big5'
687edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'zh_tw' -> 'zh_TW.eucTW' to 'zh_TW.big5'
688edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
689edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# MAL 2008-05-30:
690edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Updated alias mapping to most recent locale.alias file
691edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# from X.org distribution using makelocalealias.py.
692edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
693edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# These are the differences compared to the old mapping (Python 2.5
694edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# and older):
695edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
696edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'cs_cs.iso88592' -> 'cs_CZ.ISO8859-2' to 'cs_CS.ISO8859-2'
697edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'serbocroatian' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
698edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sh' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
699edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sh_hr.iso88592' -> 'sh_HR.ISO8859-2' to 'hr_HR.ISO8859-2'
700edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sh_sp' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
701edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sh_yu' -> 'sh_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
702edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sp' -> 'sp_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
703edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sp_yu' -> 'sp_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
704edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
705edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
706edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_sp' -> 'sr_SP.ISO8859-2' to 'sr_CS.ISO8859-2'
707edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
708edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.cp1251@cyrillic' -> 'sr_YU.CP1251' to 'sr_CS.CP1251'
709edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.iso88592' -> 'sr_YU.ISO8859-2' to 'sr_CS.ISO8859-2'
710edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.iso88595' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
711edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.iso88595@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
712edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.microsoftcp1251@cyrillic' -> 'sr_YU.CP1251' to 'sr_CS.CP1251'
713edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.utf8@cyrillic' -> 'sr_YU.UTF-8' to 'sr_CS.UTF-8'
714edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5'
715edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
716edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# AP 2010-04-12:
717edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Updated alias mapping to most recent locale.alias file
718edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# from X.org distribution using makelocalealias.py.
719edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
720edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# These are the differences compared to the old mapping (Python 2.6.5
721edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# and older):
722edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
723edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8'
724edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'ru_ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8'
725edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'serbocroatian' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
726edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sh' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
727edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sh_yu' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
728edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8'
729edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8'
730edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
731edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_cs.utf8@latn' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8@latin'
732edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_cs@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin'
733edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8@latin'
734edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu.utf8@cyrillic' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8'
735edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    updated 'sr_yu@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8'
736edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
737edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
738edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoeplocale_alias = {
739edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'a3':                                   'a3_AZ.KOI8-C',
740edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'a3_az':                                'a3_AZ.KOI8-C',
741edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'a3_az.koi8c':                          'a3_AZ.KOI8-C',
742edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'af':                                   'af_ZA.ISO8859-1',
743edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'af_za':                                'af_ZA.ISO8859-1',
744edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'af_za.iso88591':                       'af_ZA.ISO8859-1',
745edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'am':                                   'am_ET.UTF-8',
746edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'am_et':                                'am_ET.UTF-8',
747edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'american':                             'en_US.ISO8859-1',
748edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'american.iso88591':                    'en_US.ISO8859-1',
749edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar':                                   'ar_AA.ISO8859-6',
750edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_aa':                                'ar_AA.ISO8859-6',
751edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_aa.iso88596':                       'ar_AA.ISO8859-6',
752edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ae':                                'ar_AE.ISO8859-6',
753edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ae.iso88596':                       'ar_AE.ISO8859-6',
754edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_bh':                                'ar_BH.ISO8859-6',
755edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_bh.iso88596':                       'ar_BH.ISO8859-6',
756edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_dz':                                'ar_DZ.ISO8859-6',
757edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_dz.iso88596':                       'ar_DZ.ISO8859-6',
758edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_eg':                                'ar_EG.ISO8859-6',
759edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_eg.iso88596':                       'ar_EG.ISO8859-6',
760edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_iq':                                'ar_IQ.ISO8859-6',
761edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_iq.iso88596':                       'ar_IQ.ISO8859-6',
762edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_jo':                                'ar_JO.ISO8859-6',
763edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_jo.iso88596':                       'ar_JO.ISO8859-6',
764edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_kw':                                'ar_KW.ISO8859-6',
765edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_kw.iso88596':                       'ar_KW.ISO8859-6',
766edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_lb':                                'ar_LB.ISO8859-6',
767edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_lb.iso88596':                       'ar_LB.ISO8859-6',
768edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ly':                                'ar_LY.ISO8859-6',
769edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ly.iso88596':                       'ar_LY.ISO8859-6',
770edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ma':                                'ar_MA.ISO8859-6',
771edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ma.iso88596':                       'ar_MA.ISO8859-6',
772edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_om':                                'ar_OM.ISO8859-6',
773edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_om.iso88596':                       'ar_OM.ISO8859-6',
774edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_qa':                                'ar_QA.ISO8859-6',
775edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_qa.iso88596':                       'ar_QA.ISO8859-6',
776edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_sa':                                'ar_SA.ISO8859-6',
777edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_sa.iso88596':                       'ar_SA.ISO8859-6',
778edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_sd':                                'ar_SD.ISO8859-6',
779edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_sd.iso88596':                       'ar_SD.ISO8859-6',
780edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_sy':                                'ar_SY.ISO8859-6',
781edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_sy.iso88596':                       'ar_SY.ISO8859-6',
782edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_tn':                                'ar_TN.ISO8859-6',
783edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_tn.iso88596':                       'ar_TN.ISO8859-6',
784edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ye':                                'ar_YE.ISO8859-6',
785edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ar_ye.iso88596':                       'ar_YE.ISO8859-6',
786edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'arabic':                               'ar_AA.ISO8859-6',
787edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'arabic.iso88596':                      'ar_AA.ISO8859-6',
788edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'as':                                   'as_IN.UTF-8',
789edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'az':                                   'az_AZ.ISO8859-9E',
790edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'az_az':                                'az_AZ.ISO8859-9E',
791edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'az_az.iso88599e':                      'az_AZ.ISO8859-9E',
792edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be':                                   'be_BY.CP1251',
793edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be@latin':                             'be_BY.UTF-8@latin',
794edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be_by':                                'be_BY.CP1251',
795edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be_by.cp1251':                         'be_BY.CP1251',
796edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be_by.microsoftcp1251':                'be_BY.CP1251',
797edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be_by.utf8@latin':                     'be_BY.UTF-8@latin',
798edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'be_by@latin':                          'be_BY.UTF-8@latin',
799edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bg':                                   'bg_BG.CP1251',
800edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bg_bg':                                'bg_BG.CP1251',
801edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bg_bg.cp1251':                         'bg_BG.CP1251',
802edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bg_bg.iso88595':                       'bg_BG.ISO8859-5',
803edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bg_bg.koi8r':                          'bg_BG.KOI8-R',
804edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bg_bg.microsoftcp1251':                'bg_BG.CP1251',
805edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bn_in':                                'bn_IN.UTF-8',
806edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bokmal':                               'nb_NO.ISO8859-1',
807edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bokm\xe5l':                            'nb_NO.ISO8859-1',
808edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br':                                   'br_FR.ISO8859-1',
809edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr':                                'br_FR.ISO8859-1',
810edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr.iso88591':                       'br_FR.ISO8859-1',
811edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr.iso885914':                      'br_FR.ISO8859-14',
812edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr.iso885915':                      'br_FR.ISO8859-15',
813edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr.iso885915@euro':                 'br_FR.ISO8859-15',
814edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr.utf8@euro':                      'br_FR.UTF-8',
815edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'br_fr@euro':                           'br_FR.ISO8859-15',
816edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bs':                                   'bs_BA.ISO8859-2',
817edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bs_ba':                                'bs_BA.ISO8859-2',
818edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bs_ba.iso88592':                       'bs_BA.ISO8859-2',
819edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'bulgarian':                            'bg_BG.CP1251',
820edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c':                                    'C',
821edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c-french':                             'fr_CA.ISO8859-1',
822edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c-french.iso88591':                    'fr_CA.ISO8859-1',
823edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c.en':                                 'C',
824edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c.iso88591':                           'en_US.ISO8859-1',
825edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c_c':                                  'C',
826edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'c_c.c':                                'C',
827edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca':                                   'ca_ES.ISO8859-1',
828edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_ad':                                'ca_AD.ISO8859-1',
829edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_ad.iso88591':                       'ca_AD.ISO8859-1',
830edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_ad.iso885915':                      'ca_AD.ISO8859-15',
831edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_ad.iso885915@euro':                 'ca_AD.ISO8859-15',
832edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_ad.utf8@euro':                      'ca_AD.UTF-8',
833edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_ad@euro':                           'ca_AD.ISO8859-15',
834edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_es':                                'ca_ES.ISO8859-1',
835edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_es.iso88591':                       'ca_ES.ISO8859-1',
836edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_es.iso885915':                      'ca_ES.ISO8859-15',
837edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_es.iso885915@euro':                 'ca_ES.ISO8859-15',
838edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_es.utf8@euro':                      'ca_ES.UTF-8',
839edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_es@euro':                           'ca_ES.ISO8859-15',
840edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_fr':                                'ca_FR.ISO8859-1',
841edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_fr.iso88591':                       'ca_FR.ISO8859-1',
842edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_fr.iso885915':                      'ca_FR.ISO8859-15',
843edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_fr.iso885915@euro':                 'ca_FR.ISO8859-15',
844edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_fr.utf8@euro':                      'ca_FR.UTF-8',
845edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_fr@euro':                           'ca_FR.ISO8859-15',
846edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_it':                                'ca_IT.ISO8859-1',
847edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_it.iso88591':                       'ca_IT.ISO8859-1',
848edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_it.iso885915':                      'ca_IT.ISO8859-15',
849edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_it.iso885915@euro':                 'ca_IT.ISO8859-15',
850edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_it.utf8@euro':                      'ca_IT.UTF-8',
851edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ca_it@euro':                           'ca_IT.ISO8859-15',
852edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'catalan':                              'ca_ES.ISO8859-1',
853edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cextend':                              'en_US.ISO8859-1',
854edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cextend.en':                           'en_US.ISO8859-1',
855edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'chinese-s':                            'zh_CN.eucCN',
856edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'chinese-t':                            'zh_TW.eucTW',
857edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'croatian':                             'hr_HR.ISO8859-2',
858edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cs':                                   'cs_CZ.ISO8859-2',
859edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cs_cs':                                'cs_CZ.ISO8859-2',
860edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cs_cs.iso88592':                       'cs_CS.ISO8859-2',
861edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cs_cz':                                'cs_CZ.ISO8859-2',
862edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cs_cz.iso88592':                       'cs_CZ.ISO8859-2',
863edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cy':                                   'cy_GB.ISO8859-1',
864edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cy_gb':                                'cy_GB.ISO8859-1',
865edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cy_gb.iso88591':                       'cy_GB.ISO8859-1',
866edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cy_gb.iso885914':                      'cy_GB.ISO8859-14',
867edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cy_gb.iso885915':                      'cy_GB.ISO8859-15',
868edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cy_gb@euro':                           'cy_GB.ISO8859-15',
869edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cz':                                   'cs_CZ.ISO8859-2',
870edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'cz_cz':                                'cs_CZ.ISO8859-2',
871edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'czech':                                'cs_CZ.ISO8859-2',
872edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da':                                   'da_DK.ISO8859-1',
873edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da.iso885915':                         'da_DK.ISO8859-15',
874edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da_dk':                                'da_DK.ISO8859-1',
875edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da_dk.88591':                          'da_DK.ISO8859-1',
876edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da_dk.885915':                         'da_DK.ISO8859-15',
877edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da_dk.iso88591':                       'da_DK.ISO8859-1',
878edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da_dk.iso885915':                      'da_DK.ISO8859-15',
879edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'da_dk@euro':                           'da_DK.ISO8859-15',
880edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'danish':                               'da_DK.ISO8859-1',
881edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'danish.iso88591':                      'da_DK.ISO8859-1',
882edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'dansk':                                'da_DK.ISO8859-1',
883edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de':                                   'de_DE.ISO8859-1',
884edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de.iso885915':                         'de_DE.ISO8859-15',
885edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_at':                                'de_AT.ISO8859-1',
886edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_at.iso88591':                       'de_AT.ISO8859-1',
887edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_at.iso885915':                      'de_AT.ISO8859-15',
888edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_at.iso885915@euro':                 'de_AT.ISO8859-15',
889edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_at.utf8@euro':                      'de_AT.UTF-8',
890edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_at@euro':                           'de_AT.ISO8859-15',
891edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_be':                                'de_BE.ISO8859-1',
892edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_be.iso88591':                       'de_BE.ISO8859-1',
893edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_be.iso885915':                      'de_BE.ISO8859-15',
894edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_be.iso885915@euro':                 'de_BE.ISO8859-15',
895edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_be.utf8@euro':                      'de_BE.UTF-8',
896edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_be@euro':                           'de_BE.ISO8859-15',
897edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_ch':                                'de_CH.ISO8859-1',
898edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_ch.iso88591':                       'de_CH.ISO8859-1',
899edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_ch.iso885915':                      'de_CH.ISO8859-15',
900edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_ch@euro':                           'de_CH.ISO8859-15',
901edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de':                                'de_DE.ISO8859-1',
902edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.88591':                          'de_DE.ISO8859-1',
903edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.885915':                         'de_DE.ISO8859-15',
904edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.885915@euro':                    'de_DE.ISO8859-15',
905edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.iso88591':                       'de_DE.ISO8859-1',
906edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.iso885915':                      'de_DE.ISO8859-15',
907edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.iso885915@euro':                 'de_DE.ISO8859-15',
908edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de.utf8@euro':                      'de_DE.UTF-8',
909edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_de@euro':                           'de_DE.ISO8859-15',
910edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_lu':                                'de_LU.ISO8859-1',
911edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_lu.iso88591':                       'de_LU.ISO8859-1',
912edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_lu.iso885915':                      'de_LU.ISO8859-15',
913edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_lu.iso885915@euro':                 'de_LU.ISO8859-15',
914edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_lu.utf8@euro':                      'de_LU.UTF-8',
915edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'de_lu@euro':                           'de_LU.ISO8859-15',
916edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'deutsch':                              'de_DE.ISO8859-1',
917edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'dutch':                                'nl_NL.ISO8859-1',
918edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'dutch.iso88591':                       'nl_BE.ISO8859-1',
919edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ee':                                   'ee_EE.ISO8859-4',
920edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ee_ee':                                'ee_EE.ISO8859-4',
921edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ee_ee.iso88594':                       'ee_EE.ISO8859-4',
922edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eesti':                                'et_EE.ISO8859-1',
923edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'el':                                   'el_GR.ISO8859-7',
924edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'el_gr':                                'el_GR.ISO8859-7',
925edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'el_gr.iso88597':                       'el_GR.ISO8859-7',
926edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'el_gr@euro':                           'el_GR.ISO8859-15',
927edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en':                                   'en_US.ISO8859-1',
928edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en.iso88591':                          'en_US.ISO8859-1',
929edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_au':                                'en_AU.ISO8859-1',
930edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_au.iso88591':                       'en_AU.ISO8859-1',
931edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_be':                                'en_BE.ISO8859-1',
932edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_be@euro':                           'en_BE.ISO8859-15',
933edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_bw':                                'en_BW.ISO8859-1',
934edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_bw.iso88591':                       'en_BW.ISO8859-1',
935edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ca':                                'en_CA.ISO8859-1',
936edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ca.iso88591':                       'en_CA.ISO8859-1',
937edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_gb':                                'en_GB.ISO8859-1',
938edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_gb.88591':                          'en_GB.ISO8859-1',
939edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_gb.iso88591':                       'en_GB.ISO8859-1',
940edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_gb.iso885915':                      'en_GB.ISO8859-15',
941edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_gb@euro':                           'en_GB.ISO8859-15',
942edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_hk':                                'en_HK.ISO8859-1',
943edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_hk.iso88591':                       'en_HK.ISO8859-1',
944edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ie':                                'en_IE.ISO8859-1',
945edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ie.iso88591':                       'en_IE.ISO8859-1',
946edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ie.iso885915':                      'en_IE.ISO8859-15',
947edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ie.iso885915@euro':                 'en_IE.ISO8859-15',
948edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ie.utf8@euro':                      'en_IE.UTF-8',
949edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ie@euro':                           'en_IE.ISO8859-15',
950edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_in':                                'en_IN.ISO8859-1',
951edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_nz':                                'en_NZ.ISO8859-1',
952edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_nz.iso88591':                       'en_NZ.ISO8859-1',
953edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ph':                                'en_PH.ISO8859-1',
954edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_ph.iso88591':                       'en_PH.ISO8859-1',
955edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_sg':                                'en_SG.ISO8859-1',
956edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_sg.iso88591':                       'en_SG.ISO8859-1',
957edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_uk':                                'en_GB.ISO8859-1',
958edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us':                                'en_US.ISO8859-1',
959edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us.88591':                          'en_US.ISO8859-1',
960edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us.885915':                         'en_US.ISO8859-15',
961edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us.iso88591':                       'en_US.ISO8859-1',
962edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us.iso885915':                      'en_US.ISO8859-15',
963edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us.iso885915@euro':                 'en_US.ISO8859-15',
964edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us@euro':                           'en_US.ISO8859-15',
965edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_us@euro@euro':                      'en_US.ISO8859-15',
966edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_za':                                'en_ZA.ISO8859-1',
967edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_za.88591':                          'en_ZA.ISO8859-1',
968edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_za.iso88591':                       'en_ZA.ISO8859-1',
969edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_za.iso885915':                      'en_ZA.ISO8859-15',
970edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_za@euro':                           'en_ZA.ISO8859-15',
971edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_zw':                                'en_ZW.ISO8859-1',
972edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'en_zw.iso88591':                       'en_ZW.ISO8859-1',
973edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eng_gb':                               'en_GB.ISO8859-1',
974edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eng_gb.8859':                          'en_GB.ISO8859-1',
975edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english':                              'en_EN.ISO8859-1',
976edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english.iso88591':                     'en_EN.ISO8859-1',
977edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_uk':                           'en_GB.ISO8859-1',
978edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_uk.8859':                      'en_GB.ISO8859-1',
979edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_united-states':                'en_US.ISO8859-1',
980edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_united-states.437':            'C',
981edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_us':                           'en_US.ISO8859-1',
982edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_us.8859':                      'en_US.ISO8859-1',
983edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'english_us.ascii':                     'en_US.ISO8859-1',
984edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eo':                                   'eo_XX.ISO8859-3',
985edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eo_eo':                                'eo_EO.ISO8859-3',
986edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eo_eo.iso88593':                       'eo_EO.ISO8859-3',
987edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eo_xx':                                'eo_XX.ISO8859-3',
988edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eo_xx.iso88593':                       'eo_XX.ISO8859-3',
989edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es':                                   'es_ES.ISO8859-1',
990edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ar':                                'es_AR.ISO8859-1',
991edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ar.iso88591':                       'es_AR.ISO8859-1',
992edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_bo':                                'es_BO.ISO8859-1',
993edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_bo.iso88591':                       'es_BO.ISO8859-1',
994edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_cl':                                'es_CL.ISO8859-1',
995edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_cl.iso88591':                       'es_CL.ISO8859-1',
996edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_co':                                'es_CO.ISO8859-1',
997edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_co.iso88591':                       'es_CO.ISO8859-1',
998edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_cr':                                'es_CR.ISO8859-1',
999edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_cr.iso88591':                       'es_CR.ISO8859-1',
1000edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_do':                                'es_DO.ISO8859-1',
1001edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_do.iso88591':                       'es_DO.ISO8859-1',
1002edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ec':                                'es_EC.ISO8859-1',
1003edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ec.iso88591':                       'es_EC.ISO8859-1',
1004edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es':                                'es_ES.ISO8859-1',
1005edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es.88591':                          'es_ES.ISO8859-1',
1006edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es.iso88591':                       'es_ES.ISO8859-1',
1007edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es.iso885915':                      'es_ES.ISO8859-15',
1008edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es.iso885915@euro':                 'es_ES.ISO8859-15',
1009edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es.utf8@euro':                      'es_ES.UTF-8',
1010edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_es@euro':                           'es_ES.ISO8859-15',
1011edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_gt':                                'es_GT.ISO8859-1',
1012edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_gt.iso88591':                       'es_GT.ISO8859-1',
1013edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_hn':                                'es_HN.ISO8859-1',
1014edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_hn.iso88591':                       'es_HN.ISO8859-1',
1015edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_mx':                                'es_MX.ISO8859-1',
1016edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_mx.iso88591':                       'es_MX.ISO8859-1',
1017edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ni':                                'es_NI.ISO8859-1',
1018edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ni.iso88591':                       'es_NI.ISO8859-1',
1019edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pa':                                'es_PA.ISO8859-1',
1020edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pa.iso88591':                       'es_PA.ISO8859-1',
1021edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pa.iso885915':                      'es_PA.ISO8859-15',
1022edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pa@euro':                           'es_PA.ISO8859-15',
1023edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pe':                                'es_PE.ISO8859-1',
1024edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pe.iso88591':                       'es_PE.ISO8859-1',
1025edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pe.iso885915':                      'es_PE.ISO8859-15',
1026edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pe@euro':                           'es_PE.ISO8859-15',
1027edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pr':                                'es_PR.ISO8859-1',
1028edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_pr.iso88591':                       'es_PR.ISO8859-1',
1029edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_py':                                'es_PY.ISO8859-1',
1030edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_py.iso88591':                       'es_PY.ISO8859-1',
1031edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_py.iso885915':                      'es_PY.ISO8859-15',
1032edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_py@euro':                           'es_PY.ISO8859-15',
1033edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_sv':                                'es_SV.ISO8859-1',
1034edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_sv.iso88591':                       'es_SV.ISO8859-1',
1035edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_sv.iso885915':                      'es_SV.ISO8859-15',
1036edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_sv@euro':                           'es_SV.ISO8859-15',
1037edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_us':                                'es_US.ISO8859-1',
1038edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_us.iso88591':                       'es_US.ISO8859-1',
1039edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_uy':                                'es_UY.ISO8859-1',
1040edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_uy.iso88591':                       'es_UY.ISO8859-1',
1041edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_uy.iso885915':                      'es_UY.ISO8859-15',
1042edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_uy@euro':                           'es_UY.ISO8859-15',
1043edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ve':                                'es_VE.ISO8859-1',
1044edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ve.iso88591':                       'es_VE.ISO8859-1',
1045edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ve.iso885915':                      'es_VE.ISO8859-15',
1046edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'es_ve@euro':                           'es_VE.ISO8859-15',
1047edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'estonian':                             'et_EE.ISO8859-1',
1048edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et':                                   'et_EE.ISO8859-15',
1049edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et_ee':                                'et_EE.ISO8859-15',
1050edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et_ee.iso88591':                       'et_EE.ISO8859-1',
1051edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et_ee.iso885913':                      'et_EE.ISO8859-13',
1052edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et_ee.iso885915':                      'et_EE.ISO8859-15',
1053edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et_ee.iso88594':                       'et_EE.ISO8859-4',
1054edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'et_ee@euro':                           'et_EE.ISO8859-15',
1055edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu':                                   'eu_ES.ISO8859-1',
1056edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu_es':                                'eu_ES.ISO8859-1',
1057edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu_es.iso88591':                       'eu_ES.ISO8859-1',
1058edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu_es.iso885915':                      'eu_ES.ISO8859-15',
1059edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu_es.iso885915@euro':                 'eu_ES.ISO8859-15',
1060edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu_es.utf8@euro':                      'eu_ES.UTF-8',
1061edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'eu_es@euro':                           'eu_ES.ISO8859-15',
1062edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fa':                                   'fa_IR.UTF-8',
1063edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fa_ir':                                'fa_IR.UTF-8',
1064edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fa_ir.isiri3342':                      'fa_IR.ISIRI-3342',
1065edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi':                                   'fi_FI.ISO8859-15',
1066edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi.iso885915':                         'fi_FI.ISO8859-15',
1067edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi':                                'fi_FI.ISO8859-15',
1068edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi.88591':                          'fi_FI.ISO8859-1',
1069edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi.iso88591':                       'fi_FI.ISO8859-1',
1070edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi.iso885915':                      'fi_FI.ISO8859-15',
1071edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi.iso885915@euro':                 'fi_FI.ISO8859-15',
1072edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi.utf8@euro':                      'fi_FI.UTF-8',
1073edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fi_fi@euro':                           'fi_FI.ISO8859-15',
1074edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'finnish':                              'fi_FI.ISO8859-1',
1075edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'finnish.iso88591':                     'fi_FI.ISO8859-1',
1076edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fo':                                   'fo_FO.ISO8859-1',
1077edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fo_fo':                                'fo_FO.ISO8859-1',
1078edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fo_fo.iso88591':                       'fo_FO.ISO8859-1',
1079edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fo_fo.iso885915':                      'fo_FO.ISO8859-15',
1080edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fo_fo@euro':                           'fo_FO.ISO8859-15',
1081edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr':                                   'fr_FR.ISO8859-1',
1082edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr.iso885915':                         'fr_FR.ISO8859-15',
1083edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be':                                'fr_BE.ISO8859-1',
1084edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be.88591':                          'fr_BE.ISO8859-1',
1085edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be.iso88591':                       'fr_BE.ISO8859-1',
1086edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be.iso885915':                      'fr_BE.ISO8859-15',
1087edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be.iso885915@euro':                 'fr_BE.ISO8859-15',
1088edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be.utf8@euro':                      'fr_BE.UTF-8',
1089edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_be@euro':                           'fr_BE.ISO8859-15',
1090edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ca':                                'fr_CA.ISO8859-1',
1091edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ca.88591':                          'fr_CA.ISO8859-1',
1092edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ca.iso88591':                       'fr_CA.ISO8859-1',
1093edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ca.iso885915':                      'fr_CA.ISO8859-15',
1094edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ca@euro':                           'fr_CA.ISO8859-15',
1095edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ch':                                'fr_CH.ISO8859-1',
1096edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ch.88591':                          'fr_CH.ISO8859-1',
1097edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ch.iso88591':                       'fr_CH.ISO8859-1',
1098edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ch.iso885915':                      'fr_CH.ISO8859-15',
1099edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_ch@euro':                           'fr_CH.ISO8859-15',
1100edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr':                                'fr_FR.ISO8859-1',
1101edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr.88591':                          'fr_FR.ISO8859-1',
1102edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr.iso88591':                       'fr_FR.ISO8859-1',
1103edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr.iso885915':                      'fr_FR.ISO8859-15',
1104edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr.iso885915@euro':                 'fr_FR.ISO8859-15',
1105edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr.utf8@euro':                      'fr_FR.UTF-8',
1106edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_fr@euro':                           'fr_FR.ISO8859-15',
1107edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu':                                'fr_LU.ISO8859-1',
1108edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu.88591':                          'fr_LU.ISO8859-1',
1109edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu.iso88591':                       'fr_LU.ISO8859-1',
1110edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu.iso885915':                      'fr_LU.ISO8859-15',
1111edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu.iso885915@euro':                 'fr_LU.ISO8859-15',
1112edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu.utf8@euro':                      'fr_LU.UTF-8',
1113edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fr_lu@euro':                           'fr_LU.ISO8859-15',
1114edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fran\xe7ais':                          'fr_FR.ISO8859-1',
1115edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fre_fr':                               'fr_FR.ISO8859-1',
1116edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'fre_fr.8859':                          'fr_FR.ISO8859-1',
1117edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'french':                               'fr_FR.ISO8859-1',
1118edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'french.iso88591':                      'fr_CH.ISO8859-1',
1119edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'french_france':                        'fr_FR.ISO8859-1',
1120edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'french_france.8859':                   'fr_FR.ISO8859-1',
1121edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga':                                   'ga_IE.ISO8859-1',
1122edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie':                                'ga_IE.ISO8859-1',
1123edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie.iso88591':                       'ga_IE.ISO8859-1',
1124edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie.iso885914':                      'ga_IE.ISO8859-14',
1125edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie.iso885915':                      'ga_IE.ISO8859-15',
1126edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie.iso885915@euro':                 'ga_IE.ISO8859-15',
1127edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie.utf8@euro':                      'ga_IE.UTF-8',
1128edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ga_ie@euro':                           'ga_IE.ISO8859-15',
1129edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'galego':                               'gl_ES.ISO8859-1',
1130edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'galician':                             'gl_ES.ISO8859-1',
1131edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gd':                                   'gd_GB.ISO8859-1',
1132edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gd_gb':                                'gd_GB.ISO8859-1',
1133edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gd_gb.iso88591':                       'gd_GB.ISO8859-1',
1134edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gd_gb.iso885914':                      'gd_GB.ISO8859-14',
1135edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gd_gb.iso885915':                      'gd_GB.ISO8859-15',
1136edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gd_gb@euro':                           'gd_GB.ISO8859-15',
1137edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ger_de':                               'de_DE.ISO8859-1',
1138edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ger_de.8859':                          'de_DE.ISO8859-1',
1139edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'german':                               'de_DE.ISO8859-1',
1140edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'german.iso88591':                      'de_CH.ISO8859-1',
1141edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'german_germany':                       'de_DE.ISO8859-1',
1142edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'german_germany.8859':                  'de_DE.ISO8859-1',
1143edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl':                                   'gl_ES.ISO8859-1',
1144edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl_es':                                'gl_ES.ISO8859-1',
1145edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl_es.iso88591':                       'gl_ES.ISO8859-1',
1146edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl_es.iso885915':                      'gl_ES.ISO8859-15',
1147edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl_es.iso885915@euro':                 'gl_ES.ISO8859-15',
1148edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl_es.utf8@euro':                      'gl_ES.UTF-8',
1149edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gl_es@euro':                           'gl_ES.ISO8859-15',
1150edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'greek':                                'el_GR.ISO8859-7',
1151edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'greek.iso88597':                       'el_GR.ISO8859-7',
1152edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gu_in':                                'gu_IN.UTF-8',
1153edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gv':                                   'gv_GB.ISO8859-1',
1154edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gv_gb':                                'gv_GB.ISO8859-1',
1155edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gv_gb.iso88591':                       'gv_GB.ISO8859-1',
1156edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gv_gb.iso885914':                      'gv_GB.ISO8859-14',
1157edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gv_gb.iso885915':                      'gv_GB.ISO8859-15',
1158edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'gv_gb@euro':                           'gv_GB.ISO8859-15',
1159edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'he':                                   'he_IL.ISO8859-8',
1160edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'he_il':                                'he_IL.ISO8859-8',
1161edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'he_il.cp1255':                         'he_IL.CP1255',
1162edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'he_il.iso88598':                       'he_IL.ISO8859-8',
1163edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'he_il.microsoftcp1255':                'he_IL.CP1255',
1164edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hebrew':                               'iw_IL.ISO8859-8',
1165edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hebrew.iso88598':                      'iw_IL.ISO8859-8',
1166edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hi':                                   'hi_IN.ISCII-DEV',
1167edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hi_in':                                'hi_IN.ISCII-DEV',
1168edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hi_in.isciidev':                       'hi_IN.ISCII-DEV',
1169edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hne':                                  'hne_IN.UTF-8',
1170edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hr':                                   'hr_HR.ISO8859-2',
1171edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hr_hr':                                'hr_HR.ISO8859-2',
1172edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hr_hr.iso88592':                       'hr_HR.ISO8859-2',
1173edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hrvatski':                             'hr_HR.ISO8859-2',
1174edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hu':                                   'hu_HU.ISO8859-2',
1175edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hu_hu':                                'hu_HU.ISO8859-2',
1176edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hu_hu.iso88592':                       'hu_HU.ISO8859-2',
1177edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'hungarian':                            'hu_HU.ISO8859-2',
1178edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'icelandic':                            'is_IS.ISO8859-1',
1179edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'icelandic.iso88591':                   'is_IS.ISO8859-1',
1180edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'id':                                   'id_ID.ISO8859-1',
1181edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'id_id':                                'id_ID.ISO8859-1',
1182edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'in':                                   'id_ID.ISO8859-1',
1183edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'in_id':                                'id_ID.ISO8859-1',
1184edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'is':                                   'is_IS.ISO8859-1',
1185edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'is_is':                                'is_IS.ISO8859-1',
1186edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'is_is.iso88591':                       'is_IS.ISO8859-1',
1187edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'is_is.iso885915':                      'is_IS.ISO8859-15',
1188edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'is_is@euro':                           'is_IS.ISO8859-15',
1189edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso-8859-1':                           'en_US.ISO8859-1',
1190edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso-8859-15':                          'en_US.ISO8859-15',
1191edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859-1':                            'en_US.ISO8859-1',
1192edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso8859-15':                           'en_US.ISO8859-15',
1193edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso_8859_1':                           'en_US.ISO8859-1',
1194edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iso_8859_15':                          'en_US.ISO8859-15',
1195edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it':                                   'it_IT.ISO8859-1',
1196edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it.iso885915':                         'it_IT.ISO8859-15',
1197edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_ch':                                'it_CH.ISO8859-1',
1198edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_ch.iso88591':                       'it_CH.ISO8859-1',
1199edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_ch.iso885915':                      'it_CH.ISO8859-15',
1200edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_ch@euro':                           'it_CH.ISO8859-15',
1201edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it':                                'it_IT.ISO8859-1',
1202edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it.88591':                          'it_IT.ISO8859-1',
1203edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it.iso88591':                       'it_IT.ISO8859-1',
1204edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it.iso885915':                      'it_IT.ISO8859-15',
1205edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it.iso885915@euro':                 'it_IT.ISO8859-15',
1206edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it.utf8@euro':                      'it_IT.UTF-8',
1207edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'it_it@euro':                           'it_IT.ISO8859-15',
1208edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'italian':                              'it_IT.ISO8859-1',
1209edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'italian.iso88591':                     'it_IT.ISO8859-1',
1210edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iu':                                   'iu_CA.NUNACOM-8',
1211edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iu_ca':                                'iu_CA.NUNACOM-8',
1212edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iu_ca.nunacom8':                       'iu_CA.NUNACOM-8',
1213edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iw':                                   'he_IL.ISO8859-8',
1214edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iw_il':                                'he_IL.ISO8859-8',
1215edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'iw_il.iso88598':                       'he_IL.ISO8859-8',
1216edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja':                                   'ja_JP.eucJP',
1217edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja.jis':                               'ja_JP.JIS7',
1218edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja.sjis':                              'ja_JP.SJIS',
1219edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp':                                'ja_JP.eucJP',
1220edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.ajec':                           'ja_JP.eucJP',
1221edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.euc':                            'ja_JP.eucJP',
1222edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.eucjp':                          'ja_JP.eucJP',
1223edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.iso-2022-jp':                    'ja_JP.JIS7',
1224edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.iso2022jp':                      'ja_JP.JIS7',
1225edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.jis':                            'ja_JP.JIS7',
1226edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.jis7':                           'ja_JP.JIS7',
1227edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.mscode':                         'ja_JP.SJIS',
1228edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.pck':                            'ja_JP.SJIS',
1229edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.sjis':                           'ja_JP.SJIS',
1230edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ja_jp.ujis':                           'ja_JP.eucJP',
1231edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'japan':                                'ja_JP.eucJP',
1232edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'japanese':                             'ja_JP.eucJP',
1233edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'japanese-euc':                         'ja_JP.eucJP',
1234edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'japanese.euc':                         'ja_JP.eucJP',
1235edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'japanese.sjis':                        'ja_JP.SJIS',
1236edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'jp_jp':                                'ja_JP.eucJP',
1237edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ka':                                   'ka_GE.GEORGIAN-ACADEMY',
1238edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ka_ge':                                'ka_GE.GEORGIAN-ACADEMY',
1239edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ka_ge.georgianacademy':                'ka_GE.GEORGIAN-ACADEMY',
1240edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ka_ge.georgianps':                     'ka_GE.GEORGIAN-PS',
1241edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ka_ge.georgianrs':                     'ka_GE.GEORGIAN-ACADEMY',
1242edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kl':                                   'kl_GL.ISO8859-1',
1243edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kl_gl':                                'kl_GL.ISO8859-1',
1244edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kl_gl.iso88591':                       'kl_GL.ISO8859-1',
1245edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kl_gl.iso885915':                      'kl_GL.ISO8859-15',
1246edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kl_gl@euro':                           'kl_GL.ISO8859-15',
1247edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'km_kh':                                'km_KH.UTF-8',
1248edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kn':                                   'kn_IN.UTF-8',
1249edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kn_in':                                'kn_IN.UTF-8',
1250edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ko':                                   'ko_KR.eucKR',
1251edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ko_kr':                                'ko_KR.eucKR',
1252edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ko_kr.euc':                            'ko_KR.eucKR',
1253edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ko_kr.euckr':                          'ko_KR.eucKR',
1254edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'korean':                               'ko_KR.eucKR',
1255edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'korean.euc':                           'ko_KR.eucKR',
1256edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ks':                                   'ks_IN.UTF-8',
1257edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ks_in@devanagari':                     'ks_IN@devanagari.UTF-8',
1258edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kw':                                   'kw_GB.ISO8859-1',
1259edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kw_gb':                                'kw_GB.ISO8859-1',
1260edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kw_gb.iso88591':                       'kw_GB.ISO8859-1',
1261edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kw_gb.iso885914':                      'kw_GB.ISO8859-14',
1262edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kw_gb.iso885915':                      'kw_GB.ISO8859-15',
1263edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'kw_gb@euro':                           'kw_GB.ISO8859-15',
1264edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ky':                                   'ky_KG.UTF-8',
1265edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ky_kg':                                'ky_KG.UTF-8',
1266edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lithuanian':                           'lt_LT.ISO8859-13',
1267edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lo':                                   'lo_LA.MULELAO-1',
1268edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lo_la':                                'lo_LA.MULELAO-1',
1269edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lo_la.cp1133':                         'lo_LA.IBM-CP1133',
1270edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lo_la.ibmcp1133':                      'lo_LA.IBM-CP1133',
1271edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lo_la.mulelao1':                       'lo_LA.MULELAO-1',
1272edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lt':                                   'lt_LT.ISO8859-13',
1273edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lt_lt':                                'lt_LT.ISO8859-13',
1274edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lt_lt.iso885913':                      'lt_LT.ISO8859-13',
1275edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lt_lt.iso88594':                       'lt_LT.ISO8859-4',
1276edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lv':                                   'lv_LV.ISO8859-13',
1277edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lv_lv':                                'lv_LV.ISO8859-13',
1278edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lv_lv.iso885913':                      'lv_LV.ISO8859-13',
1279edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'lv_lv.iso88594':                       'lv_LV.ISO8859-4',
1280edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mai':                                  'mai_IN.UTF-8',
1281edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mi':                                   'mi_NZ.ISO8859-1',
1282edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mi_nz':                                'mi_NZ.ISO8859-1',
1283edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mi_nz.iso88591':                       'mi_NZ.ISO8859-1',
1284edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mk':                                   'mk_MK.ISO8859-5',
1285edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mk_mk':                                'mk_MK.ISO8859-5',
1286edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mk_mk.cp1251':                         'mk_MK.CP1251',
1287edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mk_mk.iso88595':                       'mk_MK.ISO8859-5',
1288edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mk_mk.microsoftcp1251':                'mk_MK.CP1251',
1289edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ml':                                   'ml_IN.UTF-8',
1290edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mr':                                   'mr_IN.UTF-8',
1291edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mr_in':                                'mr_IN.UTF-8',
1292edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ms':                                   'ms_MY.ISO8859-1',
1293edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ms_my':                                'ms_MY.ISO8859-1',
1294edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ms_my.iso88591':                       'ms_MY.ISO8859-1',
1295edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mt':                                   'mt_MT.ISO8859-3',
1296edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mt_mt':                                'mt_MT.ISO8859-3',
1297edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'mt_mt.iso88593':                       'mt_MT.ISO8859-3',
1298edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nb':                                   'nb_NO.ISO8859-1',
1299edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nb_no':                                'nb_NO.ISO8859-1',
1300edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nb_no.88591':                          'nb_NO.ISO8859-1',
1301edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nb_no.iso88591':                       'nb_NO.ISO8859-1',
1302edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nb_no.iso885915':                      'nb_NO.ISO8859-15',
1303edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nb_no@euro':                           'nb_NO.ISO8859-15',
1304edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl':                                   'nl_NL.ISO8859-1',
1305edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl.iso885915':                         'nl_NL.ISO8859-15',
1306edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be':                                'nl_BE.ISO8859-1',
1307edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be.88591':                          'nl_BE.ISO8859-1',
1308edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be.iso88591':                       'nl_BE.ISO8859-1',
1309edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be.iso885915':                      'nl_BE.ISO8859-15',
1310edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be.iso885915@euro':                 'nl_BE.ISO8859-15',
1311edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be.utf8@euro':                      'nl_BE.UTF-8',
1312edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_be@euro':                           'nl_BE.ISO8859-15',
1313edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl':                                'nl_NL.ISO8859-1',
1314edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl.88591':                          'nl_NL.ISO8859-1',
1315edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl.iso88591':                       'nl_NL.ISO8859-1',
1316edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl.iso885915':                      'nl_NL.ISO8859-15',
1317edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl.iso885915@euro':                 'nl_NL.ISO8859-15',
1318edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl.utf8@euro':                      'nl_NL.UTF-8',
1319edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nl_nl@euro':                           'nl_NL.ISO8859-15',
1320edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nn':                                   'nn_NO.ISO8859-1',
1321edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nn_no':                                'nn_NO.ISO8859-1',
1322edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nn_no.88591':                          'nn_NO.ISO8859-1',
1323edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nn_no.iso88591':                       'nn_NO.ISO8859-1',
1324edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nn_no.iso885915':                      'nn_NO.ISO8859-15',
1325edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nn_no@euro':                           'nn_NO.ISO8859-15',
1326edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no':                                   'no_NO.ISO8859-1',
1327edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no@nynorsk':                           'ny_NO.ISO8859-1',
1328edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no':                                'no_NO.ISO8859-1',
1329edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no.88591':                          'no_NO.ISO8859-1',
1330edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no.iso88591':                       'no_NO.ISO8859-1',
1331edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no.iso885915':                      'no_NO.ISO8859-15',
1332edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no.iso88591@bokmal':                'no_NO.ISO8859-1',
1333edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no.iso88591@nynorsk':               'no_NO.ISO8859-1',
1334edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'no_no@euro':                           'no_NO.ISO8859-15',
1335edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'norwegian':                            'no_NO.ISO8859-1',
1336edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'norwegian.iso88591':                   'no_NO.ISO8859-1',
1337edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nr':                                   'nr_ZA.ISO8859-1',
1338edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nr_za':                                'nr_ZA.ISO8859-1',
1339edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nr_za.iso88591':                       'nr_ZA.ISO8859-1',
1340edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nso':                                  'nso_ZA.ISO8859-15',
1341edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nso_za':                               'nso_ZA.ISO8859-15',
1342edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nso_za.iso885915':                     'nso_ZA.ISO8859-15',
1343edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ny':                                   'ny_NO.ISO8859-1',
1344edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ny_no':                                'ny_NO.ISO8859-1',
1345edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ny_no.88591':                          'ny_NO.ISO8859-1',
1346edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ny_no.iso88591':                       'ny_NO.ISO8859-1',
1347edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ny_no.iso885915':                      'ny_NO.ISO8859-15',
1348edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ny_no@euro':                           'ny_NO.ISO8859-15',
1349edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'nynorsk':                              'nn_NO.ISO8859-1',
1350edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'oc':                                   'oc_FR.ISO8859-1',
1351edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'oc_fr':                                'oc_FR.ISO8859-1',
1352edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'oc_fr.iso88591':                       'oc_FR.ISO8859-1',
1353edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'oc_fr.iso885915':                      'oc_FR.ISO8859-15',
1354edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'oc_fr@euro':                           'oc_FR.ISO8859-15',
1355edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'or':                                   'or_IN.UTF-8',
1356edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pa':                                   'pa_IN.UTF-8',
1357edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pa_in':                                'pa_IN.UTF-8',
1358edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd':                                   'pd_US.ISO8859-1',
1359edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_de':                                'pd_DE.ISO8859-1',
1360edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_de.iso88591':                       'pd_DE.ISO8859-1',
1361edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_de.iso885915':                      'pd_DE.ISO8859-15',
1362edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_de@euro':                           'pd_DE.ISO8859-15',
1363edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_us':                                'pd_US.ISO8859-1',
1364edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_us.iso88591':                       'pd_US.ISO8859-1',
1365edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_us.iso885915':                      'pd_US.ISO8859-15',
1366edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pd_us@euro':                           'pd_US.ISO8859-15',
1367edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ph':                                   'ph_PH.ISO8859-1',
1368edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ph_ph':                                'ph_PH.ISO8859-1',
1369edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ph_ph.iso88591':                       'ph_PH.ISO8859-1',
1370edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pl':                                   'pl_PL.ISO8859-2',
1371edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pl_pl':                                'pl_PL.ISO8859-2',
1372edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pl_pl.iso88592':                       'pl_PL.ISO8859-2',
1373edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'polish':                               'pl_PL.ISO8859-2',
1374edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'portuguese':                           'pt_PT.ISO8859-1',
1375edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'portuguese.iso88591':                  'pt_PT.ISO8859-1',
1376edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'portuguese_brazil':                    'pt_BR.ISO8859-1',
1377edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'portuguese_brazil.8859':               'pt_BR.ISO8859-1',
1378edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'posix':                                'C',
1379edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'posix-utf2':                           'C',
1380edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pp':                                   'pp_AN.ISO8859-1',
1381edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pp_an':                                'pp_AN.ISO8859-1',
1382edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pp_an.iso88591':                       'pp_AN.ISO8859-1',
1383edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt':                                   'pt_PT.ISO8859-1',
1384edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt.iso885915':                         'pt_PT.ISO8859-15',
1385edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_br':                                'pt_BR.ISO8859-1',
1386edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_br.88591':                          'pt_BR.ISO8859-1',
1387edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_br.iso88591':                       'pt_BR.ISO8859-1',
1388edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_br.iso885915':                      'pt_BR.ISO8859-15',
1389edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_br@euro':                           'pt_BR.ISO8859-15',
1390edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt':                                'pt_PT.ISO8859-1',
1391edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt.88591':                          'pt_PT.ISO8859-1',
1392edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt.iso88591':                       'pt_PT.ISO8859-1',
1393edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt.iso885915':                      'pt_PT.ISO8859-15',
1394edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt.iso885915@euro':                 'pt_PT.ISO8859-15',
1395edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt.utf8@euro':                      'pt_PT.UTF-8',
1396edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'pt_pt@euro':                           'pt_PT.ISO8859-15',
1397edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ro':                                   'ro_RO.ISO8859-2',
1398edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ro_ro':                                'ro_RO.ISO8859-2',
1399edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ro_ro.iso88592':                       'ro_RO.ISO8859-2',
1400edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'romanian':                             'ro_RO.ISO8859-2',
1401edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru':                                   'ru_RU.UTF-8',
1402edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru.koi8r':                             'ru_RU.KOI8-R',
1403edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ru':                                'ru_RU.UTF-8',
1404edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ru.cp1251':                         'ru_RU.CP1251',
1405edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ru.iso88595':                       'ru_RU.ISO8859-5',
1406edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ru.koi8r':                          'ru_RU.KOI8-R',
1407edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ru.microsoftcp1251':                'ru_RU.CP1251',
1408edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ua':                                'ru_UA.KOI8-U',
1409edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ua.cp1251':                         'ru_UA.CP1251',
1410edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ua.koi8u':                          'ru_UA.KOI8-U',
1411edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ru_ua.microsoftcp1251':                'ru_UA.CP1251',
1412edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'rumanian':                             'ro_RO.ISO8859-2',
1413edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'russian':                              'ru_RU.ISO8859-5',
1414edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'rw':                                   'rw_RW.ISO8859-1',
1415edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'rw_rw':                                'rw_RW.ISO8859-1',
1416edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'rw_rw.iso88591':                       'rw_RW.ISO8859-1',
1417edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sd':                                   'sd_IN@devanagari.UTF-8',
1418edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'se_no':                                'se_NO.UTF-8',
1419edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'serbocroatian':                        'sr_RS.UTF-8@latin',
1420edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sh':                                   'sr_RS.UTF-8@latin',
1421edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sh_ba.iso88592@bosnia':                'sr_CS.ISO8859-2',
1422edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sh_hr':                                'sh_HR.ISO8859-2',
1423edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sh_hr.iso88592':                       'hr_HR.ISO8859-2',
1424edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sh_sp':                                'sr_CS.ISO8859-2',
1425edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sh_yu':                                'sr_RS.UTF-8@latin',
1426edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'si':                                   'si_LK.UTF-8',
1427edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'si_lk':                                'si_LK.UTF-8',
1428edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sinhala':                              'si_LK.UTF-8',
1429edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sk':                                   'sk_SK.ISO8859-2',
1430edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sk_sk':                                'sk_SK.ISO8859-2',
1431edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sk_sk.iso88592':                       'sk_SK.ISO8859-2',
1432edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sl':                                   'sl_SI.ISO8859-2',
1433edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sl_cs':                                'sl_CS.ISO8859-2',
1434edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sl_si':                                'sl_SI.ISO8859-2',
1435edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sl_si.iso88592':                       'sl_SI.ISO8859-2',
1436edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'slovak':                               'sk_SK.ISO8859-2',
1437edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'slovene':                              'sl_SI.ISO8859-2',
1438edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'slovenian':                            'sl_SI.ISO8859-2',
1439edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sp':                                   'sr_CS.ISO8859-5',
1440edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sp_yu':                                'sr_CS.ISO8859-5',
1441edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'spanish':                              'es_ES.ISO8859-1',
1442edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'spanish.iso88591':                     'es_ES.ISO8859-1',
1443edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'spanish_spain':                        'es_ES.ISO8859-1',
1444edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'spanish_spain.8859':                   'es_ES.ISO8859-1',
1445edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sq':                                   'sq_AL.ISO8859-2',
1446edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sq_al':                                'sq_AL.ISO8859-2',
1447edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sq_al.iso88592':                       'sq_AL.ISO8859-2',
1448edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr':                                   'sr_RS.UTF-8',
1449edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr@cyrillic':                          'sr_RS.UTF-8',
1450edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr@latin':                             'sr_RS.UTF-8@latin',
1451edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr@latn':                              'sr_RS.UTF-8@latin',
1452edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_cs':                                'sr_RS.UTF-8',
1453edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_cs.iso88592':                       'sr_CS.ISO8859-2',
1454edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_cs.iso88592@latn':                  'sr_CS.ISO8859-2',
1455edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_cs.iso88595':                       'sr_CS.ISO8859-5',
1456edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_cs.utf8@latn':                      'sr_RS.UTF-8@latin',
1457edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_cs@latn':                           'sr_RS.UTF-8@latin',
1458edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_me':                                'sr_ME.UTF-8',
1459edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_rs':                                'sr_RS.UTF-8',
1460edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_rs.utf8@latn':                      'sr_RS.UTF-8@latin',
1461edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_rs@latin':                          'sr_RS.UTF-8@latin',
1462edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_rs@latn':                           'sr_RS.UTF-8@latin',
1463edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_sp':                                'sr_CS.ISO8859-2',
1464edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu':                                'sr_RS.UTF-8@latin',
1465edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu.cp1251@cyrillic':                'sr_CS.CP1251',
1466edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu.iso88592':                       'sr_CS.ISO8859-2',
1467edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu.iso88595':                       'sr_CS.ISO8859-5',
1468edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu.iso88595@cyrillic':              'sr_CS.ISO8859-5',
1469edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu.microsoftcp1251@cyrillic':       'sr_CS.CP1251',
1470edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu.utf8@cyrillic':                  'sr_RS.UTF-8',
1471edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sr_yu@cyrillic':                       'sr_RS.UTF-8',
1472edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ss':                                   'ss_ZA.ISO8859-1',
1473edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ss_za':                                'ss_ZA.ISO8859-1',
1474edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ss_za.iso88591':                       'ss_ZA.ISO8859-1',
1475edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'st':                                   'st_ZA.ISO8859-1',
1476edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'st_za':                                'st_ZA.ISO8859-1',
1477edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'st_za.iso88591':                       'st_ZA.ISO8859-1',
1478edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv':                                   'sv_SE.ISO8859-1',
1479edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv.iso885915':                         'sv_SE.ISO8859-15',
1480edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_fi':                                'sv_FI.ISO8859-1',
1481edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_fi.iso88591':                       'sv_FI.ISO8859-1',
1482edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_fi.iso885915':                      'sv_FI.ISO8859-15',
1483edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_fi.iso885915@euro':                 'sv_FI.ISO8859-15',
1484edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_fi.utf8@euro':                      'sv_FI.UTF-8',
1485edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_fi@euro':                           'sv_FI.ISO8859-15',
1486edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_se':                                'sv_SE.ISO8859-1',
1487edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_se.88591':                          'sv_SE.ISO8859-1',
1488edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_se.iso88591':                       'sv_SE.ISO8859-1',
1489edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_se.iso885915':                      'sv_SE.ISO8859-15',
1490edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'sv_se@euro':                           'sv_SE.ISO8859-15',
1491edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'swedish':                              'sv_SE.ISO8859-1',
1492edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'swedish.iso88591':                     'sv_SE.ISO8859-1',
1493edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ta':                                   'ta_IN.TSCII-0',
1494edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ta_in':                                'ta_IN.TSCII-0',
1495edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ta_in.tscii':                          'ta_IN.TSCII-0',
1496edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ta_in.tscii0':                         'ta_IN.TSCII-0',
1497edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'te':                                   'te_IN.UTF-8',
1498edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tg':                                   'tg_TJ.KOI8-C',
1499edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tg_tj':                                'tg_TJ.KOI8-C',
1500edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tg_tj.koi8c':                          'tg_TJ.KOI8-C',
1501edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'th':                                   'th_TH.ISO8859-11',
1502edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'th_th':                                'th_TH.ISO8859-11',
1503edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'th_th.iso885911':                      'th_TH.ISO8859-11',
1504edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'th_th.tactis':                         'th_TH.TIS620',
1505edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'th_th.tis620':                         'th_TH.TIS620',
1506edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'thai':                                 'th_TH.ISO8859-11',
1507edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tl':                                   'tl_PH.ISO8859-1',
1508edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tl_ph':                                'tl_PH.ISO8859-1',
1509edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tl_ph.iso88591':                       'tl_PH.ISO8859-1',
1510edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tn':                                   'tn_ZA.ISO8859-15',
1511edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tn_za':                                'tn_ZA.ISO8859-15',
1512edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tn_za.iso885915':                      'tn_ZA.ISO8859-15',
1513edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tr':                                   'tr_TR.ISO8859-9',
1514edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tr_tr':                                'tr_TR.ISO8859-9',
1515edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tr_tr.iso88599':                       'tr_TR.ISO8859-9',
1516edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ts':                                   'ts_ZA.ISO8859-1',
1517edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ts_za':                                'ts_ZA.ISO8859-1',
1518edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ts_za.iso88591':                       'ts_ZA.ISO8859-1',
1519edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tt':                                   'tt_RU.TATAR-CYR',
1520edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tt_ru':                                'tt_RU.TATAR-CYR',
1521edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tt_ru.koi8c':                          'tt_RU.KOI8-C',
1522edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'tt_ru.tatarcyr':                       'tt_RU.TATAR-CYR',
1523edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'turkish':                              'tr_TR.ISO8859-9',
1524edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'turkish.iso88599':                     'tr_TR.ISO8859-9',
1525edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uk':                                   'uk_UA.KOI8-U',
1526edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uk_ua':                                'uk_UA.KOI8-U',
1527edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uk_ua.cp1251':                         'uk_UA.CP1251',
1528edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uk_ua.iso88595':                       'uk_UA.ISO8859-5',
1529edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uk_ua.koi8u':                          'uk_UA.KOI8-U',
1530edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uk_ua.microsoftcp1251':                'uk_UA.CP1251',
1531edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'univ':                                 'en_US.utf',
1532edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'universal':                            'en_US.utf',
1533edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'universal.utf8@ucs4':                  'en_US.UTF-8',
1534edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ur':                                   'ur_PK.CP1256',
1535edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ur_pk':                                'ur_PK.CP1256',
1536edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ur_pk.cp1256':                         'ur_PK.CP1256',
1537edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'ur_pk.microsoftcp1256':                'ur_PK.CP1256',
1538edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uz':                                   'uz_UZ.UTF-8',
1539edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uz_uz':                                'uz_UZ.UTF-8',
1540edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uz_uz.iso88591':                       'uz_UZ.ISO8859-1',
1541edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uz_uz.utf8@cyrillic':                  'uz_UZ.UTF-8',
1542edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'uz_uz@cyrillic':                       'uz_UZ.UTF-8',
1543edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    've':                                   've_ZA.UTF-8',
1544edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    've_za':                                've_ZA.UTF-8',
1545edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'vi':                                   'vi_VN.TCVN',
1546edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'vi_vn':                                'vi_VN.TCVN',
1547edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'vi_vn.tcvn':                           'vi_VN.TCVN',
1548edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'vi_vn.tcvn5712':                       'vi_VN.TCVN',
1549edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'vi_vn.viscii':                         'vi_VN.VISCII',
1550edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'vi_vn.viscii111':                      'vi_VN.VISCII',
1551edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'wa':                                   'wa_BE.ISO8859-1',
1552edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'wa_be':                                'wa_BE.ISO8859-1',
1553edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'wa_be.iso88591':                       'wa_BE.ISO8859-1',
1554edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'wa_be.iso885915':                      'wa_BE.ISO8859-15',
1555edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'wa_be.iso885915@euro':                 'wa_BE.ISO8859-15',
1556edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'wa_be@euro':                           'wa_BE.ISO8859-15',
1557edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'xh':                                   'xh_ZA.ISO8859-1',
1558edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'xh_za':                                'xh_ZA.ISO8859-1',
1559edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'xh_za.iso88591':                       'xh_ZA.ISO8859-1',
1560edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'yi':                                   'yi_US.CP1255',
1561edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'yi_us':                                'yi_US.CP1255',
1562edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'yi_us.cp1255':                         'yi_US.CP1255',
1563edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'yi_us.microsoftcp1255':                'yi_US.CP1255',
1564edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh':                                   'zh_CN.eucCN',
1565edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_cn':                                'zh_CN.gb2312',
1566edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_cn.big5':                           'zh_TW.big5',
1567edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_cn.euc':                            'zh_CN.eucCN',
1568edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_cn.gb18030':                        'zh_CN.gb18030',
1569edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_cn.gb2312':                         'zh_CN.gb2312',
1570edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_cn.gbk':                            'zh_CN.gbk',
1571edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_hk':                                'zh_HK.big5hkscs',
1572edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_hk.big5':                           'zh_HK.big5',
1573edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_hk.big5hk':                         'zh_HK.big5hkscs',
1574edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_hk.big5hkscs':                      'zh_HK.big5hkscs',
1575edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_tw':                                'zh_TW.big5',
1576edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_tw.big5':                           'zh_TW.big5',
1577edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_tw.euc':                            'zh_TW.eucTW',
1578edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zh_tw.euctw':                          'zh_TW.eucTW',
1579edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zu':                                   'zu_ZA.ISO8859-1',
1580edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zu_za':                                'zu_ZA.ISO8859-1',
1581edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    'zu_za.iso88591':                       'zu_ZA.ISO8859-1',
1582edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep}
1583edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1584edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
1585edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# This maps Windows language identifiers to locale strings.
1586edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
1587edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# This list has been updated from
1588edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp
1589edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# to include every locale up to Windows Vista.
1590edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
1591edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# NOTE: this mapping is incomplete.  If your language is missing, please
1592edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# submit a bug report to the Python bug tracker at http://bugs.python.org/
1593edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# Make sure you include the missing language identifier and the suggested
1594edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep# locale code.
1595edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#
1596edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1597edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepwindows_locale = {
1598edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0436: "af_ZA", # Afrikaans
1599edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x041c: "sq_AL", # Albanian
1600edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0484: "gsw_FR",# Alsatian - France
1601edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x045e: "am_ET", # Amharic - Ethiopia
1602edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0401: "ar_SA", # Arabic - Saudi Arabia
1603edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0801: "ar_IQ", # Arabic - Iraq
1604edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c01: "ar_EG", # Arabic - Egypt
1605edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1001: "ar_LY", # Arabic - Libya
1606edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1401: "ar_DZ", # Arabic - Algeria
1607edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1801: "ar_MA", # Arabic - Morocco
1608edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1c01: "ar_TN", # Arabic - Tunisia
1609edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2001: "ar_OM", # Arabic - Oman
1610edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2401: "ar_YE", # Arabic - Yemen
1611edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2801: "ar_SY", # Arabic - Syria
1612edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2c01: "ar_JO", # Arabic - Jordan
1613edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3001: "ar_LB", # Arabic - Lebanon
1614edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3401: "ar_KW", # Arabic - Kuwait
1615edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3801: "ar_AE", # Arabic - United Arab Emirates
1616edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3c01: "ar_BH", # Arabic - Bahrain
1617edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x4001: "ar_QA", # Arabic - Qatar
1618edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x042b: "hy_AM", # Armenian
1619edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x044d: "as_IN", # Assamese - India
1620edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x042c: "az_AZ", # Azeri - Latin
1621edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x082c: "az_AZ", # Azeri - Cyrillic
1622edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x046d: "ba_RU", # Bashkir
1623edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x042d: "eu_ES", # Basque - Russia
1624edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0423: "be_BY", # Belarusian
1625edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0445: "bn_IN", # Begali
1626edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x201a: "bs_BA", # Bosnian - Cyrillic
1627edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x141a: "bs_BA", # Bosnian - Latin
1628edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x047e: "br_FR", # Breton - France
1629edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0402: "bg_BG", # Bulgarian
1630edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    0x0455: "my_MM", # Burmese - Not supported
1631edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0403: "ca_ES", # Catalan
1632edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0004: "zh_CHS",# Chinese - Simplified
1633edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0404: "zh_TW", # Chinese - Taiwan
1634edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0804: "zh_CN", # Chinese - PRC
1635edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c04: "zh_HK", # Chinese - Hong Kong S.A.R.
1636edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1004: "zh_SG", # Chinese - Singapore
1637edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1404: "zh_MO", # Chinese - Macao S.A.R.
1638edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x7c04: "zh_CHT",# Chinese - Traditional
1639edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0483: "co_FR", # Corsican - France
1640edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x041a: "hr_HR", # Croatian
1641edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x101a: "hr_BA", # Croatian - Bosnia
1642edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0405: "cs_CZ", # Czech
1643edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0406: "da_DK", # Danish
1644edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x048c: "gbz_AF",# Dari - Afghanistan
1645edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0465: "div_MV",# Divehi - Maldives
1646edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0413: "nl_NL", # Dutch - The Netherlands
1647edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0813: "nl_BE", # Dutch - Belgium
1648edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0409: "en_US", # English - United States
1649edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0809: "en_GB", # English - United Kingdom
1650edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c09: "en_AU", # English - Australia
1651edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1009: "en_CA", # English - Canada
1652edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1409: "en_NZ", # English - New Zealand
1653edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1809: "en_IE", # English - Ireland
1654edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1c09: "en_ZA", # English - South Africa
1655edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2009: "en_JA", # English - Jamaica
1656edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2409: "en_CB", # English - Carribbean
1657edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2809: "en_BZ", # English - Belize
1658edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2c09: "en_TT", # English - Trinidad
1659edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3009: "en_ZW", # English - Zimbabwe
1660edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3409: "en_PH", # English - Philippines
1661edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x4009: "en_IN", # English - India
1662edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x4409: "en_MY", # English - Malaysia
1663edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x4809: "en_IN", # English - Singapore
1664edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0425: "et_EE", # Estonian
1665edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0438: "fo_FO", # Faroese
1666edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0464: "fil_PH",# Filipino
1667edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x040b: "fi_FI", # Finnish
1668edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x040c: "fr_FR", # French - France
1669edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x080c: "fr_BE", # French - Belgium
1670edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c0c: "fr_CA", # French - Canada
1671edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x100c: "fr_CH", # French - Switzerland
1672edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x140c: "fr_LU", # French - Luxembourg
1673edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x180c: "fr_MC", # French - Monaco
1674edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0462: "fy_NL", # Frisian - Netherlands
1675edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0456: "gl_ES", # Galician
1676edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0437: "ka_GE", # Georgian
1677edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0407: "de_DE", # German - Germany
1678edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0807: "de_CH", # German - Switzerland
1679edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c07: "de_AT", # German - Austria
1680edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1007: "de_LU", # German - Luxembourg
1681edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1407: "de_LI", # German - Liechtenstein
1682edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0408: "el_GR", # Greek
1683edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x046f: "kl_GL", # Greenlandic - Greenland
1684edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0447: "gu_IN", # Gujarati
1685edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0468: "ha_NG", # Hausa - Latin
1686edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x040d: "he_IL", # Hebrew
1687edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0439: "hi_IN", # Hindi
1688edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x040e: "hu_HU", # Hungarian
1689edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x040f: "is_IS", # Icelandic
1690edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0421: "id_ID", # Indonesian
1691edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x045d: "iu_CA", # Inuktitut - Syllabics
1692edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x085d: "iu_CA", # Inuktitut - Latin
1693edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x083c: "ga_IE", # Irish - Ireland
1694edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0410: "it_IT", # Italian - Italy
1695edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0810: "it_CH", # Italian - Switzerland
1696edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0411: "ja_JP", # Japanese
1697edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x044b: "kn_IN", # Kannada - India
1698edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x043f: "kk_KZ", # Kazakh
1699edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0453: "kh_KH", # Khmer - Cambodia
1700edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0486: "qut_GT",# K'iche - Guatemala
1701edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0487: "rw_RW", # Kinyarwanda - Rwanda
1702edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0457: "kok_IN",# Konkani
1703edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0412: "ko_KR", # Korean
1704edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0440: "ky_KG", # Kyrgyz
1705edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0454: "lo_LA", # Lao - Lao PDR
1706edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0426: "lv_LV", # Latvian
1707edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0427: "lt_LT", # Lithuanian
1708edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x082e: "dsb_DE",# Lower Sorbian - Germany
1709edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x046e: "lb_LU", # Luxembourgish
1710edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x042f: "mk_MK", # FYROM Macedonian
1711edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x043e: "ms_MY", # Malay - Malaysia
1712edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x083e: "ms_BN", # Malay - Brunei Darussalam
1713edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x044c: "ml_IN", # Malayalam - India
1714edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x043a: "mt_MT", # Maltese
1715edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0481: "mi_NZ", # Maori
1716edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x047a: "arn_CL",# Mapudungun
1717edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x044e: "mr_IN", # Marathi
1718edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x047c: "moh_CA",# Mohawk - Canada
1719edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0450: "mn_MN", # Mongolian - Cyrillic
1720edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0850: "mn_CN", # Mongolian - PRC
1721edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0461: "ne_NP", # Nepali
1722edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0414: "nb_NO", # Norwegian - Bokmal
1723edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0814: "nn_NO", # Norwegian - Nynorsk
1724edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0482: "oc_FR", # Occitan - France
1725edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0448: "or_IN", # Oriya - India
1726edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0463: "ps_AF", # Pashto - Afghanistan
1727edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0429: "fa_IR", # Persian
1728edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0415: "pl_PL", # Polish
1729edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0416: "pt_BR", # Portuguese - Brazil
1730edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0816: "pt_PT", # Portuguese - Portugal
1731edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0446: "pa_IN", # Punjabi
1732edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x046b: "quz_BO",# Quechua (Bolivia)
1733edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x086b: "quz_EC",# Quechua (Ecuador)
1734edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c6b: "quz_PE",# Quechua (Peru)
1735edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0418: "ro_RO", # Romanian - Romania
1736edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0417: "rm_CH", # Romansh
1737edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0419: "ru_RU", # Russian
1738edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x243b: "smn_FI",# Sami Finland
1739edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x103b: "smj_NO",# Sami Norway
1740edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x143b: "smj_SE",# Sami Sweden
1741edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x043b: "se_NO", # Sami Northern Norway
1742edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x083b: "se_SE", # Sami Northern Sweden
1743edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c3b: "se_FI", # Sami Northern Finland
1744edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x203b: "sms_FI",# Sami Skolt
1745edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x183b: "sma_NO",# Sami Southern Norway
1746edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1c3b: "sma_SE",# Sami Southern Sweden
1747edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x044f: "sa_IN", # Sanskrit
1748edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c1a: "sr_SP", # Serbian - Cyrillic
1749edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1c1a: "sr_BA", # Serbian - Bosnia Cyrillic
1750edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x081a: "sr_SP", # Serbian - Latin
1751edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x181a: "sr_BA", # Serbian - Bosnia Latin
1752edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x045b: "si_LK", # Sinhala - Sri Lanka
1753edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x046c: "ns_ZA", # Northern Sotho
1754edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0432: "tn_ZA", # Setswana - Southern Africa
1755edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x041b: "sk_SK", # Slovak
1756edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0424: "sl_SI", # Slovenian
1757edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x040a: "es_ES", # Spanish - Spain
1758edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x080a: "es_MX", # Spanish - Mexico
1759edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0c0a: "es_ES", # Spanish - Spain (Modern)
1760edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x100a: "es_GT", # Spanish - Guatemala
1761edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x140a: "es_CR", # Spanish - Costa Rica
1762edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x180a: "es_PA", # Spanish - Panama
1763edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x1c0a: "es_DO", # Spanish - Dominican Republic
1764edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x200a: "es_VE", # Spanish - Venezuela
1765edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x240a: "es_CO", # Spanish - Colombia
1766edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x280a: "es_PE", # Spanish - Peru
1767edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x2c0a: "es_AR", # Spanish - Argentina
1768edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x300a: "es_EC", # Spanish - Ecuador
1769edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x340a: "es_CL", # Spanish - Chile
1770edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x380a: "es_UR", # Spanish - Uruguay
1771edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x3c0a: "es_PY", # Spanish - Paraguay
1772edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x400a: "es_BO", # Spanish - Bolivia
1773edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x440a: "es_SV", # Spanish - El Salvador
1774edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x480a: "es_HN", # Spanish - Honduras
1775edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x4c0a: "es_NI", # Spanish - Nicaragua
1776edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x500a: "es_PR", # Spanish - Puerto Rico
1777edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x540a: "es_US", # Spanish - United States
1778edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep#    0x0430: "", # Sutu - Not supported
1779edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0441: "sw_KE", # Swahili
1780edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x041d: "sv_SE", # Swedish - Sweden
1781edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x081d: "sv_FI", # Swedish - Finland
1782edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x045a: "syr_SY",# Syriac
1783edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0428: "tg_TJ", # Tajik - Cyrillic
1784edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x085f: "tmz_DZ",# Tamazight - Latin
1785edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0449: "ta_IN", # Tamil
1786edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0444: "tt_RU", # Tatar
1787edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x044a: "te_IN", # Telugu
1788edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x041e: "th_TH", # Thai
1789edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0851: "bo_BT", # Tibetan - Bhutan
1790edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0451: "bo_CN", # Tibetan - PRC
1791edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x041f: "tr_TR", # Turkish
1792edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0442: "tk_TM", # Turkmen - Cyrillic
1793edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0480: "ug_CN", # Uighur - Arabic
1794edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0422: "uk_UA", # Ukrainian
1795edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x042e: "wen_DE",# Upper Sorbian - Germany
1796edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0420: "ur_PK", # Urdu
1797edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0820: "ur_IN", # Urdu - India
1798edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0443: "uz_UZ", # Uzbek - Latin
1799edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0843: "uz_UZ", # Uzbek - Cyrillic
1800edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x042a: "vi_VN", # Vietnamese
1801edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0452: "cy_GB", # Welsh
1802edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0488: "wo_SN", # Wolof - Senegal
1803edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0434: "xh_ZA", # Xhosa - South Africa
1804edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0485: "sah_RU",# Yakut - Cyrillic
1805edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0478: "ii_CN", # Yi - PRC
1806edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x046a: "yo_NG", # Yoruba - Nigeria
1807edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    0x0435: "zu_ZA", # Zulu
1808edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep}
1809edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1810edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepdef _print_locale():
1811edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1812edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """ Test function.
1813edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    """
1814edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    categories = {}
1815edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    def _init_categories(categories=categories):
1816edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        for k,v in globals().items():
1817edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            if k[:3] == 'LC_':
1818edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep                categories[k] = v
1819edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    _init_categories()
1820edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    del categories['LC_ALL']
1821edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1822edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Locale defaults as determined by getdefaultlocale():'
1823edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print '-'*72
1824edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    lang, enc = getdefaultlocale()
1825edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Language: ', lang or '(undefined)'
1826edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Encoding: ', enc or '(undefined)'
1827edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print
1828edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1829edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Locale settings on startup:'
1830edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print '-'*72
1831edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    for name,category in categories.items():
1832edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print name, '...'
1833edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        lang, enc = getlocale(category)
1834edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print '   Language: ', lang or '(undefined)'
1835edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print '   Encoding: ', enc or '(undefined)'
1836edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print
1837edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1838edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print
1839edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Locale settings after calling resetlocale():'
1840edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print '-'*72
1841edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    resetlocale()
1842edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    for name,category in categories.items():
1843edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print name, '...'
1844edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        lang, enc = getlocale(category)
1845edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print '   Language: ', lang or '(undefined)'
1846edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print '   Encoding: ', enc or '(undefined)'
1847edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print
1848edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1849edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    try:
1850edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        setlocale(LC_ALL, "")
1851edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    except:
1852edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print 'NOTE:'
1853edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print 'setlocale(LC_ALL, "") does not support the default locale'
1854edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print 'given in the OS environment variables.'
1855edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    else:
1856edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print
1857edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print 'Locale settings after calling setlocale(LC_ALL, ""):'
1858edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        print '-'*72
1859edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep        for name,category in categories.items():
1860edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            print name, '...'
1861edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            lang, enc = getlocale(category)
1862edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            print '   Language: ', lang or '(undefined)'
1863edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            print '   Encoding: ', enc or '(undefined)'
1864edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep            print
1865edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1866edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep###
1867edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1868edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoeptry:
1869edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    LC_MESSAGES
1870edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepexcept NameError:
1871edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    pass
1872edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepelse:
1873edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    __all__.append("LC_MESSAGES")
1874edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep
1875edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoepif __name__=='__main__':
1876edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Locale aliasing:'
1877edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print
1878edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    _print_locale()
1879edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print
1880edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print 'Number formatting:'
1881edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    print
1882edbb763a2b63074cd468a5d33a17908b2cc0654Jeff Vander Stoep    _test()
1883