Hakan Ardo avatar Hakan Ardo committed 2447f54

svn merge -r79225:HEAD svn+ssh://hakanardo@codespeak.net/svn/pypy/trunk

Comments (0)

Files changed (419)

ctypes_configure/configure.py

 C_HEADER = """
 #include <stdio.h>
 #include <stddef.h>   /* for offsetof() */
+#include <stdint.h>   /* FreeBSD: for uint64_t */
 
 void dump(char* key, int value) {
     printf("%s: %d\\n", key, value);

lib-python/conftest.py

     RegrTest('test_augassign.py', core=True),
     RegrTest('test_base64.py'),
     RegrTest('test_bastion.py'),
-    RegrTest('test_binascii.py'),
+    RegrTest('test_binascii.py', usemodules='binascii'),
 
     RegrTest('test_binhex.py'),
 

lib-python/modified-2.5.2/distutils/msvccompiler.py

 from distutils import log
 from distutils.util import get_platform
 
-import _winreg
+try:
+    import _winreg
+except ImportError:
+    pass
+else:
+    RegOpenKeyEx = _winreg.OpenKeyEx
+    RegEnumKey = _winreg.EnumKey
+    RegEnumValue = _winreg.EnumValue
+    RegError = _winreg.error
 
-RegOpenKeyEx = _winreg.OpenKeyEx
-RegEnumKey = _winreg.EnumKey
-RegEnumValue = _winreg.EnumValue
-RegError = _winreg.error
-
-HKEYS = (_winreg.HKEY_USERS,
-         _winreg.HKEY_CURRENT_USER,
-         _winreg.HKEY_LOCAL_MACHINE,
-         _winreg.HKEY_CLASSES_ROOT)
+    HKEYS = (_winreg.HKEY_USERS,
+             _winreg.HKEY_CURRENT_USER,
+             _winreg.HKEY_LOCAL_MACHINE,
+             _winreg.HKEY_CLASSES_ROOT)
 
 VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
 VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f"

lib-python/modified-2.5.2/distutils/tests/test_msvccompiler.py

         else:
             self.fail("could not find a suitable manifest")
 
+class MsvcCompilerSimplerTestCase(unittest.TestCase):
+    def test_import_module(self):
+        from distutils.msvccompiler import MSVCCompiler
+
 def test_suite():
     if sys.platform == 'win32':
         return unittest.makeSuite(MsvcCompilerTestCase)
     else:
-        return unittest.TestSuite([])
+        return unittest.makeSuite(MsvcCompilerSimplerTestCase)
 
 if __name__ == "__main__":
     unittest.main(defaultTest="test_suite")

lib-python/modified-2.5.2/distutils/unixccompiler.py

                   }
 
     if sys.platform[:6] == "darwin":
+        import platform
+        if platform.machine() == 'i386':
+            if platform.architecture()[0] == '32bit':
+                arch = 'i386'
+            else:
+                arch = 'x86_64'
+        else:
+            # just a guess
+            arch = platform.machine()
         executables['ranlib'] = ["ranlib"]
+        executables['linker_so'] += ['-undefined', 'dynamic_lookup']
+
+        for k, v in executables.iteritems():
+            if v and v[0] == 'cc':
+                v += ['-arch', arch]
+
 
     # Needed for the filename generation methods provided by the base
     # class, CCompiler.  NB. whoever instantiates/uses a particular

lib-python/modified-2.5.2/encodings/__init__.py

-""" Standard "encodings" Package
-
-    Standard Python encoding modules are stored in this package
-    directory.
-
-    Codec modules must have names corresponding to normalized encoding
-    names as defined in the normalize_encoding() function below, e.g.
-    'utf-8' must be implemented by the module 'utf_8.py'.
-
-    Each codec module must export the following interface:
-
-    * getregentry() -> codecs.CodecInfo object
-    The getregentry() API must a CodecInfo object with encoder, decoder,
-    incrementalencoder, incrementaldecoder, streamwriter and streamreader
-    atttributes which adhere to the Python Codec Interface Standard.
-
-    In addition, a module may optionally also define the following
-    APIs which are then used by the package's codec search function:
-
-    * getaliases() -> sequence of encoding name strings to use as aliases
-
-    Alias names returned by getaliases() must be normalized encoding
-    names as defined by normalize_encoding().
-
-Written by Marc-Andre Lemburg (mal@lemburg.com).
-
-(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
-
-"""#"
-
-import codecs, types
-from encodings import aliases
-
-_cache = {}
-_unknown = '--unknown--'
-_import_tail = ['*']
-_norm_encoding_map = ('                                              . '
-                      '0123456789       ABCDEFGHIJKLMNOPQRSTUVWXYZ     '
-                      ' abcdefghijklmnopqrstuvwxyz                     '
-                      '                                                '
-                      '                                                '
-                      '                ')
-_aliases = aliases.aliases
-
-class CodecRegistryError(LookupError, SystemError):
-    pass
-
-def normalize_encoding(encoding):
-
-    """ Normalize an encoding name.
-
-        Normalization works as follows: all non-alphanumeric
-        characters except the dot used for Python package names are
-        collapsed and replaced with a single underscore, e.g. '  -;#'
-        becomes '_'. Leading and trailing underscores are removed.
-
-        Note that encoding names should be ASCII only; if they do use
-        non-ASCII characters, these must be Latin-1 compatible.
-
-    """
-    # Make sure we have an 8-bit string, because .translate() works
-    # differently for Unicode strings.
-    if type(encoding) is types.UnicodeType:
-        # Note that .encode('latin-1') does *not* use the codec
-        # registry, so this call doesn't recurse. (See unicodeobject.c
-        # PyUnicode_AsEncodedString() for details)
-        encoding = encoding.encode('latin-1')
-    return '_'.join(encoding.translate(_norm_encoding_map).split())
-
-def search_function(encoding):
-
-    # Cache lookup
-    entry = _cache.get(encoding, _unknown)
-    if entry is not _unknown:
-        return entry
-
-    # Import the module:
-    #
-    # First try to find an alias for the normalized encoding
-    # name and lookup the module using the aliased name, then try to
-    # lookup the module using the standard import scheme, i.e. first
-    # try in the encodings package, then at top-level.
-    #
-    norm_encoding = normalize_encoding(encoding)
-    aliased_encoding = _aliases.get(norm_encoding) or \
-                       _aliases.get(norm_encoding.replace('.', '_'))
-    if aliased_encoding is not None:
-        modnames = [aliased_encoding,
-                    norm_encoding]
-    else:
-        modnames = [norm_encoding]
-    for modname in modnames:
-        if not modname or '.' in modname:
-            continue
-        try:
-            mod = __import__('encodings.' + modname,
-                             globals(), locals(), _import_tail)
-        except ImportError:
-            pass
-        else:
-            break
-    else:
-        mod = None
-
-    try:
-        getregentry = mod.getregentry
-    except AttributeError:
-        # Not a codec module
-        mod = None
-
-    if mod is None:
-        # Cache misses
-        _cache[encoding] = None
-        return None
-
-    # Now ask the module for the registry entry
-    entry = getregentry()
-    if not isinstance(entry, codecs.CodecInfo):
-        if not 4 <= len(entry) <= 7:
-            raise CodecRegistryError,\
-                 'module "%s" (%s) failed to register' % \
-                  (mod.__name__, mod.__file__)
-        if not callable(entry[0]) or \
-           not callable(entry[1]) or \
-           (entry[2] is not None and not callable(entry[2])) or \
-           (entry[3] is not None and not callable(entry[3])) or \
-           (len(entry) > 4 and entry[4] is not None and not callable(entry[4])) or \
-           (len(entry) > 5 and entry[5] is not None and not callable(entry[5])):
-            raise CodecRegistryError,\
-                'incompatible codecs in module "%s" (%s)' % \
-                (mod.__name__, mod.__file__)
-        if len(entry)<7 or entry[6] is None:
-            entry += (None,)*(6-len(entry)) + (mod.__name__.split(".", 1)[1],)
-        entry = codecs.CodecInfo(*entry)
-
-    # Cache the codec registry entry
-    _cache[encoding] = entry
-
-    # Register its aliases (without overwriting previously registered
-    # aliases)
-    try:
-        codecaliases = mod.getaliases()
-    except AttributeError:
-        pass
-    else:
-        for alias in codecaliases:
-            if not _aliases.has_key(alias):
-                _aliases[alias] = modname
-
-    # Return the registry entry
-    return entry
-
-# Register the search_function in the Python codec registry
-codecs.register(search_function)

lib-python/modified-2.5.2/encodings/aliases.py

-""" Encoding Aliases Support
-
-    This module is used by the encodings package search function to
-    map encodings names to module names.
-
-    Note that the search function normalizes the encoding names before
-    doing the lookup, so the mapping will have to map normalized
-    encoding names to module names.
-
-    Contents:
-
-        The following aliases dictionary contains mappings of all IANA
-        character set names for which the Python core library provides
-        codecs. In addition to these, a few Python specific codec
-        aliases have also been added.
-
-"""
-aliases = {
-
-    # Please keep this list sorted alphabetically by value !
-
-    # ascii codec
-    '646'                : 'ascii',
-    'ansi_x3.4_1968'     : 'ascii',
-    'ansi_x3_4_1968'     : 'ascii', # some email headers use this non-standard name
-    'ansi_x3.4_1986'     : 'ascii',
-    'cp367'              : 'ascii',
-    'csascii'            : 'ascii',
-    'ibm367'             : 'ascii',
-    'iso646_us'          : 'ascii',
-    'iso_646.irv_1991'   : 'ascii',
-    'iso_ir_6'           : 'ascii',
-    'us'                 : 'ascii',
-    'us_ascii'           : 'ascii',
-
-    # base64_codec codec
-    'base64'             : 'base64_codec',
-    'base_64'            : 'base64_codec',
-
-    # big5 codec
-    'big5_tw'            : 'big5',
-    'csbig5'             : 'big5',
-
-    # big5hkscs codec
-    'big5_hkscs'         : 'big5hkscs',
-    'hkscs'              : 'big5hkscs',
-
-    # bz2_codec codec
-    'bz2'                : 'bz2_codec',
-
-    # cp037 codec
-    '037'                : 'cp037',
-    'csibm037'           : 'cp037',
-    'ebcdic_cp_ca'       : 'cp037',
-    'ebcdic_cp_nl'       : 'cp037',
-    'ebcdic_cp_us'       : 'cp037',
-    'ebcdic_cp_wt'       : 'cp037',
-    'ibm037'             : 'cp037',
-    'ibm039'             : 'cp037',
-
-    # cp1026 codec
-    '1026'               : 'cp1026',
-    'csibm1026'          : 'cp1026',
-    'ibm1026'            : 'cp1026',
-
-    # cp1140 codec
-    '1140'               : 'cp1140',
-    'ibm1140'            : 'cp1140',
-
-    # cp1250 codec
-    '1250'               : 'cp1250',
-    'windows_1250'       : 'cp1250',
-
-    # cp1251 codec
-    '1251'               : 'cp1251',
-    'windows_1251'       : 'cp1251',
-
-    # cp1252 codec
-    '1252'               : 'cp1252',
-    'windows_1252'       : 'cp1252',
-
-    # cp1253 codec
-    '1253'               : 'cp1253',
-    'windows_1253'       : 'cp1253',
-
-    # cp1254 codec
-    '1254'               : 'cp1254',
-    'windows_1254'       : 'cp1254',
-
-    # cp1255 codec
-    '1255'               : 'cp1255',
-    'windows_1255'       : 'cp1255',
-
-    # cp1256 codec
-    '1256'               : 'cp1256',
-    'windows_1256'       : 'cp1256',
-
-    # cp1257 codec
-    '1257'               : 'cp1257',
-    'windows_1257'       : 'cp1257',
-
-    # cp1258 codec
-    '1258'               : 'cp1258',
-    'windows_1258'       : 'cp1258',
-
-    # cp424 codec
-    '424'                : 'cp424',
-    'csibm424'           : 'cp424',
-    'ebcdic_cp_he'       : 'cp424',
-    'ibm424'             : 'cp424',
-
-    # cp437 codec
-    '437'                : 'cp437',
-    'cspc8codepage437'   : 'cp437',
-    'ibm437'             : 'cp437',
-
-    # cp500 codec
-    '500'                : 'cp500',
-    'csibm500'           : 'cp500',
-    'ebcdic_cp_be'       : 'cp500',
-    'ebcdic_cp_ch'       : 'cp500',
-    'ibm500'             : 'cp500',
-
-    # cp775 codec
-    '775'                : 'cp775',
-    'cspc775baltic'      : 'cp775',
-    'ibm775'             : 'cp775',
-
-    # cp850 codec
-    '850'                : 'cp850',
-    'cspc850multilingual' : 'cp850',
-    'ibm850'             : 'cp850',
-
-    # cp852 codec
-    '852'                : 'cp852',
-    'cspcp852'           : 'cp852',
-    'ibm852'             : 'cp852',
-
-    # cp855 codec
-    '855'                : 'cp855',
-    'csibm855'           : 'cp855',
-    'ibm855'             : 'cp855',
-
-    # cp857 codec
-    '857'                : 'cp857',
-    'csibm857'           : 'cp857',
-    'ibm857'             : 'cp857',
-
-    # cp860 codec
-    '860'                : 'cp860',
-    'csibm860'           : 'cp860',
-    'ibm860'             : 'cp860',
-
-    # cp861 codec
-    '861'                : 'cp861',
-    'cp_is'              : 'cp861',
-    'csibm861'           : 'cp861',
-    'ibm861'             : 'cp861',
-
-    # cp862 codec
-    '862'                : 'cp862',
-    'cspc862latinhebrew' : 'cp862',
-    'ibm862'             : 'cp862',
-
-    # cp863 codec
-    '863'                : 'cp863',
-    'csibm863'           : 'cp863',
-    'ibm863'             : 'cp863',
-
-    # cp864 codec
-    '864'                : 'cp864',
-    'csibm864'           : 'cp864',
-    'ibm864'             : 'cp864',
-
-    # cp865 codec
-    '865'                : 'cp865',
-    'csibm865'           : 'cp865',
-    'ibm865'             : 'cp865',
-
-    # cp866 codec
-    '866'                : 'cp866',
-    'csibm866'           : 'cp866',
-    'ibm866'             : 'cp866',
-
-    # cp869 codec
-    '869'                : 'cp869',
-    'cp_gr'              : 'cp869',
-    'csibm869'           : 'cp869',
-    'ibm869'             : 'cp869',
-
-    # cp932 codec
-    '932'                : 'cp932',
-    'ms932'              : 'cp932',
-    'mskanji'            : 'cp932',
-    'ms_kanji'           : 'cp932',
-
-    # cp949 codec
-    '949'                : 'cp949',
-    'ms949'              : 'cp949',
-    'uhc'                : 'cp949',
-
-    # cp950 codec
-    '950'                : 'cp950',
-    'ms950'              : 'cp950',
-
-    # euc_jis_2004 codec
-    'jisx0213'           : 'euc_jis_2004',
-    'eucjis2004'         : 'euc_jis_2004',
-    'euc_jis2004'        : 'euc_jis_2004',
-
-    # euc_jisx0213 codec
-    'eucjisx0213'        : 'euc_jisx0213',
-
-    # euc_jp codec
-    'eucjp'              : 'euc_jp',
-    'ujis'               : 'euc_jp',
-    'u_jis'              : 'euc_jp',
-
-    # euc_kr codec
-    'euckr'              : 'euc_kr',
-    'korean'             : 'euc_kr',
-    'ksc5601'            : 'euc_kr',
-    'ks_c_5601'          : 'euc_kr',
-    'ks_c_5601_1987'     : 'euc_kr',
-    'ksx1001'            : 'euc_kr',
-    'ks_x_1001'          : 'euc_kr',
-
-    # gb18030 codec
-    'gb18030_2000'       : 'gb18030',
-
-    # gb2312 codec
-    'chinese'            : 'gb2312',
-    'csiso58gb231280'    : 'gb2312',
-    'euc_cn'             : 'gb2312',
-    'euccn'              : 'gb2312',
-    'eucgb2312_cn'       : 'gb2312',
-    'gb2312_1980'        : 'gb2312',
-    'gb2312_80'          : 'gb2312',
-    'iso_ir_58'          : 'gb2312',
-
-    # gbk codec
-    '936'                : 'gbk',
-    'cp936'              : 'gbk',
-    'ms936'              : 'gbk',
-
-    # hex_codec codec
-    'hex'                : 'hex_codec',
-
-    # hp_roman8 codec
-    'roman8'             : 'hp_roman8',
-    'r8'                 : 'hp_roman8',
-    'csHPRoman8'         : 'hp_roman8',
-
-    # hz codec
-    'hzgb'               : 'hz',
-    'hz_gb'              : 'hz',
-    'hz_gb_2312'         : 'hz',
-
-    # iso2022_jp codec
-    'csiso2022jp'        : 'iso2022_jp',
-    'iso2022jp'          : 'iso2022_jp',
-    'iso_2022_jp'        : 'iso2022_jp',
-
-    # iso2022_jp_1 codec
-    'iso2022jp_1'        : 'iso2022_jp_1',
-    'iso_2022_jp_1'      : 'iso2022_jp_1',
-
-    # iso2022_jp_2 codec
-    'iso2022jp_2'        : 'iso2022_jp_2',
-    'iso_2022_jp_2'      : 'iso2022_jp_2',
-
-    # iso2022_jp_2004 codec
-    'iso_2022_jp_2004'   : 'iso2022_jp_2004',
-    'iso2022jp_2004'     : 'iso2022_jp_2004',
-
-    # iso2022_jp_3 codec
-    'iso2022jp_3'        : 'iso2022_jp_3',
-    'iso_2022_jp_3'      : 'iso2022_jp_3',
-
-    # iso2022_jp_ext codec
-    'iso2022jp_ext'      : 'iso2022_jp_ext',
-    'iso_2022_jp_ext'    : 'iso2022_jp_ext',
-
-    # iso2022_kr codec
-    'csiso2022kr'        : 'iso2022_kr',
-    'iso2022kr'          : 'iso2022_kr',
-    'iso_2022_kr'        : 'iso2022_kr',
-
-    # iso8859_10 codec
-    'csisolatin6'        : 'iso8859_10',
-    'iso_8859_10'        : 'iso8859_10',
-    'iso_8859_10_1992'   : 'iso8859_10',
-    'iso_ir_157'         : 'iso8859_10',
-    'l6'                 : 'iso8859_10',
-    'latin6'             : 'iso8859_10',
-
-    # iso8859_11 codec
-    'thai'               : 'iso8859_11',
-    'iso_8859_11'        : 'iso8859_11',
-    'iso_8859_11_2001'   : 'iso8859_11',
-
-    # iso8859_13 codec
-    'iso_8859_13'        : 'iso8859_13',
-
-    # iso8859_14 codec
-    'iso_8859_14'        : 'iso8859_14',
-    'iso_8859_14_1998'   : 'iso8859_14',
-    'iso_celtic'         : 'iso8859_14',
-    'iso_ir_199'         : 'iso8859_14',
-    'l8'                 : 'iso8859_14',
-    'latin8'             : 'iso8859_14',
-
-    # iso8859_15 codec
-    'iso_8859_15'        : 'iso8859_15',
-
-    # iso8859_16 codec
-    'iso_8859_16'        : 'iso8859_16',
-    'iso_8859_16_2001'   : 'iso8859_16',
-    'iso_ir_226'         : 'iso8859_16',
-    'l10'                : 'iso8859_16',
-    'latin10'            : 'iso8859_16',
-
-    # iso8859_2 codec
-    'csisolatin2'        : 'iso8859_2',
-    'iso_8859_2'         : 'iso8859_2',
-    'iso_8859_2_1987'    : 'iso8859_2',
-    'iso_ir_101'         : 'iso8859_2',
-    'l2'                 : 'iso8859_2',
-    'latin2'             : 'iso8859_2',
-
-    # iso8859_3 codec
-    'csisolatin3'        : 'iso8859_3',
-    'iso_8859_3'         : 'iso8859_3',
-    'iso_8859_3_1988'    : 'iso8859_3',
-    'iso_ir_109'         : 'iso8859_3',
-    'l3'                 : 'iso8859_3',
-    'latin3'             : 'iso8859_3',
-
-    # iso8859_4 codec
-    'csisolatin4'        : 'iso8859_4',
-    'iso_8859_4'         : 'iso8859_4',
-    'iso_8859_4_1988'    : 'iso8859_4',
-    'iso_ir_110'         : 'iso8859_4',
-    'l4'                 : 'iso8859_4',
-    'latin4'             : 'iso8859_4',
-
-    # iso8859_5 codec
-    'csisolatincyrillic' : 'iso8859_5',
-    'cyrillic'           : 'iso8859_5',
-    'iso_8859_5'         : 'iso8859_5',
-    'iso_8859_5_1988'    : 'iso8859_5',
-    'iso_ir_144'         : 'iso8859_5',
-
-    # iso8859_6 codec
-    'arabic'             : 'iso8859_6',
-    'asmo_708'           : 'iso8859_6',
-    'csisolatinarabic'   : 'iso8859_6',
-    'ecma_114'           : 'iso8859_6',
-    'iso_8859_6'         : 'iso8859_6',
-    'iso_8859_6_1987'    : 'iso8859_6',
-    'iso_ir_127'         : 'iso8859_6',
-
-    # iso8859_7 codec
-    'csisolatingreek'    : 'iso8859_7',
-    'ecma_118'           : 'iso8859_7',
-    'elot_928'           : 'iso8859_7',
-    'greek'              : 'iso8859_7',
-    'greek8'             : 'iso8859_7',
-    'iso_8859_7'         : 'iso8859_7',
-    'iso_8859_7_1987'    : 'iso8859_7',
-    'iso_ir_126'         : 'iso8859_7',
-
-    # iso8859_8 codec
-    'csisolatinhebrew'   : 'iso8859_8',
-    'hebrew'             : 'iso8859_8',
-    'iso_8859_8'         : 'iso8859_8',
-    'iso_8859_8_1988'    : 'iso8859_8',
-    'iso_ir_138'         : 'iso8859_8',
-
-    # iso8859_9 codec
-    'csisolatin5'        : 'iso8859_9',
-    'iso_8859_9'         : 'iso8859_9',
-    'iso_8859_9_1989'    : 'iso8859_9',
-    'iso_ir_148'         : 'iso8859_9',
-    'l5'                 : 'iso8859_9',
-    'latin5'             : 'iso8859_9',
-
-    # johab codec
-    'cp1361'             : 'johab',
-    'ms1361'             : 'johab',
-
-    # koi8_r codec
-    'cskoi8r'            : 'koi8_r',
-
-    # latin_1 codec
-    #
-    # Note that the latin_1 codec is implemented internally in C and a
-    # lot faster than the charmap codec iso8859_1 which uses the same
-    # encoding. This is why we discourage the use of the iso8859_1
-    # codec and alias it to latin_1 instead.
-    #
-    '8859'               : 'latin_1',
-    'cp819'              : 'latin_1',
-    'csisolatin1'        : 'latin_1',
-    'ibm819'             : 'latin_1',
-    'iso8859'            : 'latin_1',
-    'iso8859_1'          : 'latin_1',
-    'iso_8859_1'         : 'latin_1',
-    'iso_8859_1_1987'    : 'latin_1',
-    'iso_ir_100'         : 'latin_1',
-    'l1'                 : 'latin_1',
-    'latin'              : 'latin_1',
-    'latin1'             : 'latin_1',
-
-    # mac_cyrillic codec
-    'maccyrillic'        : 'mac_cyrillic',
-
-    # mac_greek codec
-    'macgreek'           : 'mac_greek',
-
-    # mac_iceland codec
-    'maciceland'         : 'mac_iceland',
-
-    # mac_latin2 codec
-    'maccentraleurope'   : 'mac_latin2',
-    'maclatin2'          : 'mac_latin2',
-
-    # mac_roman codec
-    'macroman'           : 'mac_roman',
-
-    # mac_turkish codec
-    'macturkish'         : 'mac_turkish',
-
-    # mbcs codec
-    'dbcs'               : 'mbcs',
-
-    # ptcp154 codec
-    'csptcp154'          : 'ptcp154',
-    'pt154'              : 'ptcp154',
-    'cp154'              : 'ptcp154',
-    'cyrillic-asian'     : 'ptcp154',
-
-    # quopri_codec codec
-    'quopri'             : 'quopri_codec',
-    'quoted_printable'   : 'quopri_codec',
-    'quotedprintable'    : 'quopri_codec',
-
-    # rot_13 codec
-    'rot13'              : 'rot_13',
-
-    # shift_jis codec
-    'csshiftjis'         : 'shift_jis',
-    'shiftjis'           : 'shift_jis',
-    'sjis'               : 'shift_jis',
-    's_jis'              : 'shift_jis',
-
-    # shift_jis_2004 codec
-    'shiftjis2004'       : 'shift_jis_2004',
-    'sjis_2004'          : 'shift_jis_2004',
-    's_jis_2004'         : 'shift_jis_2004',
-
-    # shift_jisx0213 codec
-    'shiftjisx0213'      : 'shift_jisx0213',
-    'sjisx0213'          : 'shift_jisx0213',
-    's_jisx0213'         : 'shift_jisx0213',
-
-    # tactis codec
-    'tis260'             : 'tactis',
-
-    # tis_620 codec
-    'tis620'             : 'tis_620',
-    'tis_620_0'          : 'tis_620',
-    'tis_620_2529_0'     : 'tis_620',
-    'tis_620_2529_1'     : 'tis_620',
-    'iso_ir_166'         : 'tis_620',
-
-    # utf_16 codec
-    'u16'                : 'utf_16',
-    'utf16'              : 'utf_16',
-
-    # utf_16_be codec
-    'unicodebigunmarked' : 'utf_16_be',
-    'utf_16be'           : 'utf_16_be',
-
-    # utf_16_le codec
-    'unicodelittleunmarked' : 'utf_16_le',
-    'utf_16le'           : 'utf_16_le',
-
-    # utf_7 codec
-    'u7'                 : 'utf_7',
-    'utf7'               : 'utf_7',
-    'unicode_1_1_utf_7'  : 'utf_7',
-
-    # utf_8 codec
-    'u8'                 : 'utf_8',
-    'utf'                : 'utf_8',
-    'utf8'               : 'utf_8',
-    'utf8_ucs2'          : 'utf_8',
-    'utf8_ucs4'          : 'utf_8',
-
-    # uu_codec codec
-    'uu'                 : 'uu_codec',
-
-    # zlib_codec codec
-    'zip'                : 'zlib_codec',
-    'zlib'               : 'zlib_codec',
-
-}

lib-python/modified-2.5.2/encodings/ascii.py

-""" Python 'ascii' Codec
-
-
-Written by Marc-Andre Lemburg (mal@lemburg.com).
-
-(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
-
-"""
-import codecs
-
-### Codec APIs
-
-class Codec(codecs.Codec):
-
-    # Note: Binding these as C functions will result in the class not
-    # converting them to methods. This is intended.
-    encode = staticmethod(codecs.ascii_encode)
-    decode = staticmethod(codecs.ascii_decode)
-
-class IncrementalEncoder(codecs.IncrementalEncoder):
-    def encode(self, input, final=False):
-        return codecs.ascii_encode(input, self.errors)[0]
-
-class IncrementalDecoder(codecs.IncrementalDecoder):
-    def decode(self, input, final=False):
-        return codecs.ascii_decode(input, self.errors)[0]
-
-class StreamWriter(Codec,codecs.StreamWriter):
-    pass
-
-class StreamReader(Codec,codecs.StreamReader):
-    pass
-
-class StreamConverter(StreamWriter,StreamReader):
-
-    encode = codecs.ascii_decode
-    decode = codecs.ascii_encode
-
-### encodings module API
-
-def getregentry():
-    return codecs.CodecInfo(
-        name='ascii',
-        encode=Codec.encode,
-        decode=Codec.decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamwriter=StreamWriter,
-        streamreader=StreamReader,
-    )

lib-python/modified-2.5.2/encodings/base64_codec.py

-""" Python 'base64_codec' Codec - base64 content transfer encoding
-
-    Unlike most of the other codecs which target Unicode, this codec
-    will return Python string objects for both encode and decode.
-
-    Written by Marc-Andre Lemburg (mal@lemburg.com).
-
-"""
-import codecs, base64
-
-### Codec APIs
-
-def base64_encode(input,errors='strict'):
-
-    """ Encodes the object input and returns a tuple (output
-        object, length consumed).
-
-        errors defines the error handling to apply. It defaults to
-        'strict' handling which is the only currently supported
-        error handling for this codec.
-
-    """
-    assert errors == 'strict'
-    output = base64.encodestring(input)
-    return (output, len(input))
-
-def base64_decode(input,errors='strict'):
-
-    """ Decodes the object input and returns a tuple (output
-        object, length consumed).
-
-        input must be an object which provides the bf_getreadbuf
-        buffer slot. Python strings, buffer objects and memory
-        mapped files are examples of objects providing this slot.
-
-        errors defines the error handling to apply. It defaults to
-        'strict' handling which is the only currently supported
-        error handling for this codec.
-
-    """
-    assert errors == 'strict'
-    output = base64.decodestring(input)
-    return (output, len(input))
-
-class Codec(codecs.Codec):
-
-    def encode(self, input,errors='strict'):
-        return base64_encode(input,errors)
-    def decode(self, input,errors='strict'):
-        return base64_decode(input,errors)
-
-class IncrementalEncoder(codecs.IncrementalEncoder):
-    def encode(self, input, final=False):
-        assert self.errors == 'strict'
-        return base64.encodestring(input)
-
-class IncrementalDecoder(codecs.IncrementalDecoder):
-    def decode(self, input, final=False):
-        assert self.errors == 'strict'
-        return base64.decodestring(input)
-
-class StreamWriter(Codec,codecs.StreamWriter):
-    pass
-
-class StreamReader(Codec,codecs.StreamReader):
-    pass
-
-### encodings module API
-
-def getregentry():
-    return codecs.CodecInfo(
-        name='base64',
-        encode=base64_encode,
-        decode=base64_decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamwriter=StreamWriter,
-        streamreader=StreamReader,
-    )

lib-python/modified-2.5.2/encodings/big5.py

-#
-# big5.py: Python Unicode Codec for BIG5
-#
-# Written by Hye-Shik Chang <perky@FreeBSD.org>
-#
-
-import _codecs_tw, codecs
-import _multibytecodec as mbc
-
-codec = _codecs_tw.getcodec('big5')
-
-class Codec(codecs.Codec):
-    encode = codec.encode
-    decode = codec.decode
-
-class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
-                         codecs.IncrementalEncoder):
-    codec = codec
-
-class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
-                         codecs.IncrementalDecoder):
-    codec = codec
-
-class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
-    codec = codec
-
-class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
-    codec = codec
-
-def getregentry():
-    return codecs.CodecInfo(
-        name='big5',
-        encode=Codec().encode,
-        decode=Codec().decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamreader=StreamReader,
-        streamwriter=StreamWriter,
-    )

lib-python/modified-2.5.2/encodings/big5hkscs.py

-#
-# big5hkscs.py: Python Unicode Codec for BIG5HKSCS
-#
-# Written by Hye-Shik Chang <perky@FreeBSD.org>
-#
-
-import _codecs_hk, codecs
-import _multibytecodec as mbc
-
-codec = _codecs_hk.getcodec('big5hkscs')
-
-class Codec(codecs.Codec):
-    encode = codec.encode
-    decode = codec.decode
-
-class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
-                         codecs.IncrementalEncoder):
-    codec = codec
-
-class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
-                         codecs.IncrementalDecoder):
-    codec = codec
-
-class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
-    codec = codec
-
-class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
-    codec = codec
-
-def getregentry():
-    return codecs.CodecInfo(
-        name='big5hkscs',
-        encode=Codec().encode,
-        decode=Codec().decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamreader=StreamReader,
-        streamwriter=StreamWriter,
-    )

lib-python/modified-2.5.2/encodings/bz2_codec.py

-""" Python 'bz2_codec' Codec - bz2 compression encoding
-
-    Unlike most of the other codecs which target Unicode, this codec
-    will return Python string objects for both encode and decode.
-
-    Adapted by Raymond Hettinger from zlib_codec.py which was written
-    by Marc-Andre Lemburg (mal@lemburg.com).
-
-"""
-import codecs
-import bz2 # this codec needs the optional bz2 module !
-
-### Codec APIs
-
-def bz2_encode(input,errors='strict'):
-
-    """ Encodes the object input and returns a tuple (output
-        object, length consumed).
-
-        errors defines the error handling to apply. It defaults to
-        'strict' handling which is the only currently supported
-        error handling for this codec.
-
-    """
-    assert errors == 'strict'
-    output = bz2.compress(input)
-    return (output, len(input))
-
-def bz2_decode(input,errors='strict'):
-
-    """ Decodes the object input and returns a tuple (output
-        object, length consumed).
-
-        input must be an object which provides the bf_getreadbuf
-        buffer slot. Python strings, buffer objects and memory
-        mapped files are examples of objects providing this slot.
-
-        errors defines the error handling to apply. It defaults to
-        'strict' handling which is the only currently supported
-        error handling for this codec.
-
-    """
-    assert errors == 'strict'
-    output = bz2.decompress(input)
-    return (output, len(input))
-
-class Codec(codecs.Codec):
-
-    def encode(self, input, errors='strict'):
-        return bz2_encode(input, errors)
-    def decode(self, input, errors='strict'):
-        return bz2_decode(input, errors)
-
-class IncrementalEncoder(codecs.IncrementalEncoder):
-    def __init__(self, errors='strict'):
-        assert errors == 'strict'
-        self.errors = errors
-        self.compressobj = bz2.BZ2Compressor()
-
-    def encode(self, input, final=False):
-        if final:
-            c = self.compressobj.compress(input)
-            return c + self.compressobj.flush()
-        else:
-            return self.compressobj.compress(input)
-
-    def reset(self):
-        self.compressobj = bz2.BZ2Compressor()
-
-class IncrementalDecoder(codecs.IncrementalDecoder):
-    def __init__(self, errors='strict'):
-        assert errors == 'strict'
-        self.errors = errors
-        self.decompressobj = bz2.BZ2Decompressor()
-
-    def decode(self, input, final=False):
-        try:
-            return self.decompressobj.decompress(input)
-        except EOFError:
-            return ''
-
-    def reset(self):
-        self.decompressobj = bz2.BZ2Decompressor()
-
-class StreamWriter(Codec,codecs.StreamWriter):
-    pass
-
-class StreamReader(Codec,codecs.StreamReader):
-    pass
-
-### encodings module API
-
-def getregentry():
-    return codecs.CodecInfo(
-        name="bz2",
-        encode=bz2_encode,
-        decode=bz2_decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamwriter=StreamWriter,
-        streamreader=StreamReader,
-    )

lib-python/modified-2.5.2/encodings/charmap.py

-""" Generic Python Character Mapping Codec.
-
-    Use this codec directly rather than through the automatic
-    conversion mechanisms supplied by unicode() and .encode().
-
-
-Written by Marc-Andre Lemburg (mal@lemburg.com).
-
-(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
-
-"""#"
-
-import codecs
-
-### Codec APIs
-
-class Codec(codecs.Codec):
-
-    # Note: Binding these as C functions will result in the class not
-    # converting them to methods. This is intended.
-    encode = staticmethod(codecs.charmap_encode)
-    decode = staticmethod(codecs.charmap_decode)
-
-class IncrementalEncoder(codecs.IncrementalEncoder):
-    def __init__(self, errors='strict', mapping=None):
-        codecs.IncrementalEncoder.__init__(self, errors)
-        self.mapping = mapping
-
-    def encode(self, input, final=False):
-        return codecs.charmap_encode(input, self.errors, self.mapping)[0]
-
-class IncrementalDecoder(codecs.IncrementalDecoder):
-    def __init__(self, errors='strict', mapping=None):
-        codecs.IncrementalDecoder.__init__(self, errors)
-        self.mapping = mapping
-
-    def decode(self, input, final=False):
-        return codecs.charmap_decode(input, self.errors, self.mapping)[0]
-
-class StreamWriter(Codec,codecs.StreamWriter):
-
-    def __init__(self,stream,errors='strict',mapping=None):
-        codecs.StreamWriter.__init__(self,stream,errors)
-        self.mapping = mapping
-
-    def encode(self,input,errors='strict'):
-        return Codec.encode(input,errors,self.mapping)
-
-class StreamReader(Codec,codecs.StreamReader):
-
-    def __init__(self,stream,errors='strict',mapping=None):
-        codecs.StreamReader.__init__(self,stream,errors)
-        self.mapping = mapping
-
-    def decode(self,input,errors='strict'):
-        return Codec.decode(input,errors,self.mapping)
-
-### encodings module API
-
-def getregentry():
-    return codecs.CodecInfo(
-        name='charmap',
-        encode=Codec.encode,
-        decode=Codec.decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamwriter=StreamWriter,
-        streamreader=StreamReader,
-    )

lib-python/modified-2.5.2/encodings/cp037.py

-""" Python Character Mapping Codec cp037 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.TXT' with gencodec.py.
-
-"""#"
-
-import codecs
-
-### Codec APIs
-
-class Codec(codecs.Codec):
-
-    def encode(self,input,errors='strict'):
-        return codecs.charmap_encode(input,errors,encoding_table)
-
-    def decode(self,input,errors='strict'):
-        return codecs.charmap_decode(input,errors,decoding_table)
-
-class IncrementalEncoder(codecs.IncrementalEncoder):
-    def encode(self, input, final=False):
-        return codecs.charmap_encode(input,self.errors,encoding_table)[0]
-
-class IncrementalDecoder(codecs.IncrementalDecoder):
-    def decode(self, input, final=False):
-        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
-
-class StreamWriter(Codec,codecs.StreamWriter):
-    pass
-
-class StreamReader(Codec,codecs.StreamReader):
-    pass
-
-### encodings module API
-
-def getregentry():
-    return codecs.CodecInfo(
-        name='cp037',
-        encode=Codec().encode,
-        decode=Codec().decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamreader=StreamReader,
-        streamwriter=StreamWriter,
-    )
-
-
-### Decoding Table
-
-decoding_table = (
-    u'\x00'     #  0x00 -> NULL
-    u'\x01'     #  0x01 -> START OF HEADING
-    u'\x02'     #  0x02 -> START OF TEXT
-    u'\x03'     #  0x03 -> END OF TEXT
-    u'\x9c'     #  0x04 -> CONTROL
-    u'\t'       #  0x05 -> HORIZONTAL TABULATION
-    u'\x86'     #  0x06 -> CONTROL
-    u'\x7f'     #  0x07 -> DELETE
-    u'\x97'     #  0x08 -> CONTROL
-    u'\x8d'     #  0x09 -> CONTROL
-    u'\x8e'     #  0x0A -> CONTROL
-    u'\x0b'     #  0x0B -> VERTICAL TABULATION
-    u'\x0c'     #  0x0C -> FORM FEED
-    u'\r'       #  0x0D -> CARRIAGE RETURN
-    u'\x0e'     #  0x0E -> SHIFT OUT
-    u'\x0f'     #  0x0F -> SHIFT IN
-    u'\x10'     #  0x10 -> DATA LINK ESCAPE
-    u'\x11'     #  0x11 -> DEVICE CONTROL ONE
-    u'\x12'     #  0x12 -> DEVICE CONTROL TWO
-    u'\x13'     #  0x13 -> DEVICE CONTROL THREE
-    u'\x9d'     #  0x14 -> CONTROL
-    u'\x85'     #  0x15 -> CONTROL
-    u'\x08'     #  0x16 -> BACKSPACE
-    u'\x87'     #  0x17 -> CONTROL
-    u'\x18'     #  0x18 -> CANCEL
-    u'\x19'     #  0x19 -> END OF MEDIUM
-    u'\x92'     #  0x1A -> CONTROL
-    u'\x8f'     #  0x1B -> CONTROL
-    u'\x1c'     #  0x1C -> FILE SEPARATOR
-    u'\x1d'     #  0x1D -> GROUP SEPARATOR
-    u'\x1e'     #  0x1E -> RECORD SEPARATOR
-    u'\x1f'     #  0x1F -> UNIT SEPARATOR
-    u'\x80'     #  0x20 -> CONTROL
-    u'\x81'     #  0x21 -> CONTROL
-    u'\x82'     #  0x22 -> CONTROL
-    u'\x83'     #  0x23 -> CONTROL
-    u'\x84'     #  0x24 -> CONTROL
-    u'\n'       #  0x25 -> LINE FEED
-    u'\x17'     #  0x26 -> END OF TRANSMISSION BLOCK
-    u'\x1b'     #  0x27 -> ESCAPE
-    u'\x88'     #  0x28 -> CONTROL
-    u'\x89'     #  0x29 -> CONTROL
-    u'\x8a'     #  0x2A -> CONTROL
-    u'\x8b'     #  0x2B -> CONTROL
-    u'\x8c'     #  0x2C -> CONTROL
-    u'\x05'     #  0x2D -> ENQUIRY
-    u'\x06'     #  0x2E -> ACKNOWLEDGE
-    u'\x07'     #  0x2F -> BELL
-    u'\x90'     #  0x30 -> CONTROL
-    u'\x91'     #  0x31 -> CONTROL
-    u'\x16'     #  0x32 -> SYNCHRONOUS IDLE
-    u'\x93'     #  0x33 -> CONTROL
-    u'\x94'     #  0x34 -> CONTROL
-    u'\x95'     #  0x35 -> CONTROL
-    u'\x96'     #  0x36 -> CONTROL
-    u'\x04'     #  0x37 -> END OF TRANSMISSION
-    u'\x98'     #  0x38 -> CONTROL
-    u'\x99'     #  0x39 -> CONTROL
-    u'\x9a'     #  0x3A -> CONTROL
-    u'\x9b'     #  0x3B -> CONTROL
-    u'\x14'     #  0x3C -> DEVICE CONTROL FOUR
-    u'\x15'     #  0x3D -> NEGATIVE ACKNOWLEDGE
-    u'\x9e'     #  0x3E -> CONTROL
-    u'\x1a'     #  0x3F -> SUBSTITUTE
-    u' '        #  0x40 -> SPACE
-    u'\xa0'     #  0x41 -> NO-BREAK SPACE
-    u'\xe2'     #  0x42 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
-    u'\xe4'     #  0x43 -> LATIN SMALL LETTER A WITH DIAERESIS
-    u'\xe0'     #  0x44 -> LATIN SMALL LETTER A WITH GRAVE
-    u'\xe1'     #  0x45 -> LATIN SMALL LETTER A WITH ACUTE
-    u'\xe3'     #  0x46 -> LATIN SMALL LETTER A WITH TILDE
-    u'\xe5'     #  0x47 -> LATIN SMALL LETTER A WITH RING ABOVE
-    u'\xe7'     #  0x48 -> LATIN SMALL LETTER C WITH CEDILLA
-    u'\xf1'     #  0x49 -> LATIN SMALL LETTER N WITH TILDE
-    u'\xa2'     #  0x4A -> CENT SIGN
-    u'.'        #  0x4B -> FULL STOP
-    u'<'        #  0x4C -> LESS-THAN SIGN
-    u'('        #  0x4D -> LEFT PARENTHESIS
-    u'+'        #  0x4E -> PLUS SIGN
-    u'|'        #  0x4F -> VERTICAL LINE
-    u'&'        #  0x50 -> AMPERSAND
-    u'\xe9'     #  0x51 -> LATIN SMALL LETTER E WITH ACUTE
-    u'\xea'     #  0x52 -> LATIN SMALL LETTER E WITH CIRCUMFLEX
-    u'\xeb'     #  0x53 -> LATIN SMALL LETTER E WITH DIAERESIS
-    u'\xe8'     #  0x54 -> LATIN SMALL LETTER E WITH GRAVE
-    u'\xed'     #  0x55 -> LATIN SMALL LETTER I WITH ACUTE
-    u'\xee'     #  0x56 -> LATIN SMALL LETTER I WITH CIRCUMFLEX
-    u'\xef'     #  0x57 -> LATIN SMALL LETTER I WITH DIAERESIS
-    u'\xec'     #  0x58 -> LATIN SMALL LETTER I WITH GRAVE
-    u'\xdf'     #  0x59 -> LATIN SMALL LETTER SHARP S (GERMAN)
-    u'!'        #  0x5A -> EXCLAMATION MARK
-    u'$'        #  0x5B -> DOLLAR SIGN
-    u'*'        #  0x5C -> ASTERISK
-    u')'        #  0x5D -> RIGHT PARENTHESIS
-    u';'        #  0x5E -> SEMICOLON
-    u'\xac'     #  0x5F -> NOT SIGN
-    u'-'        #  0x60 -> HYPHEN-MINUS
-    u'/'        #  0x61 -> SOLIDUS
-    u'\xc2'     #  0x62 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
-    u'\xc4'     #  0x63 -> LATIN CAPITAL LETTER A WITH DIAERESIS
-    u'\xc0'     #  0x64 -> LATIN CAPITAL LETTER A WITH GRAVE
-    u'\xc1'     #  0x65 -> LATIN CAPITAL LETTER A WITH ACUTE
-    u'\xc3'     #  0x66 -> LATIN CAPITAL LETTER A WITH TILDE
-    u'\xc5'     #  0x67 -> LATIN CAPITAL LETTER A WITH RING ABOVE
-    u'\xc7'     #  0x68 -> LATIN CAPITAL LETTER C WITH CEDILLA
-    u'\xd1'     #  0x69 -> LATIN CAPITAL LETTER N WITH TILDE
-    u'\xa6'     #  0x6A -> BROKEN BAR
-    u','        #  0x6B -> COMMA
-    u'%'        #  0x6C -> PERCENT SIGN
-    u'_'        #  0x6D -> LOW LINE
-    u'>'        #  0x6E -> GREATER-THAN SIGN
-    u'?'        #  0x6F -> QUESTION MARK
-    u'\xf8'     #  0x70 -> LATIN SMALL LETTER O WITH STROKE
-    u'\xc9'     #  0x71 -> LATIN CAPITAL LETTER E WITH ACUTE
-    u'\xca'     #  0x72 -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
-    u'\xcb'     #  0x73 -> LATIN CAPITAL LETTER E WITH DIAERESIS
-    u'\xc8'     #  0x74 -> LATIN CAPITAL LETTER E WITH GRAVE
-    u'\xcd'     #  0x75 -> LATIN CAPITAL LETTER I WITH ACUTE
-    u'\xce'     #  0x76 -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
-    u'\xcf'     #  0x77 -> LATIN CAPITAL LETTER I WITH DIAERESIS
-    u'\xcc'     #  0x78 -> LATIN CAPITAL LETTER I WITH GRAVE
-    u'`'        #  0x79 -> GRAVE ACCENT
-    u':'        #  0x7A -> COLON
-    u'#'        #  0x7B -> NUMBER SIGN
-    u'@'        #  0x7C -> COMMERCIAL AT
-    u"'"        #  0x7D -> APOSTROPHE
-    u'='        #  0x7E -> EQUALS SIGN
-    u'"'        #  0x7F -> QUOTATION MARK
-    u'\xd8'     #  0x80 -> LATIN CAPITAL LETTER O WITH STROKE
-    u'a'        #  0x81 -> LATIN SMALL LETTER A
-    u'b'        #  0x82 -> LATIN SMALL LETTER B
-    u'c'        #  0x83 -> LATIN SMALL LETTER C
-    u'd'        #  0x84 -> LATIN SMALL LETTER D
-    u'e'        #  0x85 -> LATIN SMALL LETTER E
-    u'f'        #  0x86 -> LATIN SMALL LETTER F
-    u'g'        #  0x87 -> LATIN SMALL LETTER G
-    u'h'        #  0x88 -> LATIN SMALL LETTER H
-    u'i'        #  0x89 -> LATIN SMALL LETTER I
-    u'\xab'     #  0x8A -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-    u'\xbb'     #  0x8B -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-    u'\xf0'     #  0x8C -> LATIN SMALL LETTER ETH (ICELANDIC)
-    u'\xfd'     #  0x8D -> LATIN SMALL LETTER Y WITH ACUTE
-    u'\xfe'     #  0x8E -> LATIN SMALL LETTER THORN (ICELANDIC)
-    u'\xb1'     #  0x8F -> PLUS-MINUS SIGN
-    u'\xb0'     #  0x90 -> DEGREE SIGN
-    u'j'        #  0x91 -> LATIN SMALL LETTER J
-    u'k'        #  0x92 -> LATIN SMALL LETTER K
-    u'l'        #  0x93 -> LATIN SMALL LETTER L
-    u'm'        #  0x94 -> LATIN SMALL LETTER M
-    u'n'        #  0x95 -> LATIN SMALL LETTER N
-    u'o'        #  0x96 -> LATIN SMALL LETTER O
-    u'p'        #  0x97 -> LATIN SMALL LETTER P
-    u'q'        #  0x98 -> LATIN SMALL LETTER Q
-    u'r'        #  0x99 -> LATIN SMALL LETTER R
-    u'\xaa'     #  0x9A -> FEMININE ORDINAL INDICATOR
-    u'\xba'     #  0x9B -> MASCULINE ORDINAL INDICATOR
-    u'\xe6'     #  0x9C -> LATIN SMALL LIGATURE AE
-    u'\xb8'     #  0x9D -> CEDILLA
-    u'\xc6'     #  0x9E -> LATIN CAPITAL LIGATURE AE
-    u'\xa4'     #  0x9F -> CURRENCY SIGN
-    u'\xb5'     #  0xA0 -> MICRO SIGN
-    u'~'        #  0xA1 -> TILDE
-    u's'        #  0xA2 -> LATIN SMALL LETTER S
-    u't'        #  0xA3 -> LATIN SMALL LETTER T
-    u'u'        #  0xA4 -> LATIN SMALL LETTER U
-    u'v'        #  0xA5 -> LATIN SMALL LETTER V
-    u'w'        #  0xA6 -> LATIN SMALL LETTER W
-    u'x'        #  0xA7 -> LATIN SMALL LETTER X
-    u'y'        #  0xA8 -> LATIN SMALL LETTER Y
-    u'z'        #  0xA9 -> LATIN SMALL LETTER Z
-    u'\xa1'     #  0xAA -> INVERTED EXCLAMATION MARK
-    u'\xbf'     #  0xAB -> INVERTED QUESTION MARK
-    u'\xd0'     #  0xAC -> LATIN CAPITAL LETTER ETH (ICELANDIC)
-    u'\xdd'     #  0xAD -> LATIN CAPITAL LETTER Y WITH ACUTE
-    u'\xde'     #  0xAE -> LATIN CAPITAL LETTER THORN (ICELANDIC)
-    u'\xae'     #  0xAF -> REGISTERED SIGN
-    u'^'        #  0xB0 -> CIRCUMFLEX ACCENT
-    u'\xa3'     #  0xB1 -> POUND SIGN
-    u'\xa5'     #  0xB2 -> YEN SIGN
-    u'\xb7'     #  0xB3 -> MIDDLE DOT
-    u'\xa9'     #  0xB4 -> COPYRIGHT SIGN
-    u'\xa7'     #  0xB5 -> SECTION SIGN
-    u'\xb6'     #  0xB6 -> PILCROW SIGN
-    u'\xbc'     #  0xB7 -> VULGAR FRACTION ONE QUARTER
-    u'\xbd'     #  0xB8 -> VULGAR FRACTION ONE HALF
-    u'\xbe'     #  0xB9 -> VULGAR FRACTION THREE QUARTERS
-    u'['        #  0xBA -> LEFT SQUARE BRACKET
-    u']'        #  0xBB -> RIGHT SQUARE BRACKET
-    u'\xaf'     #  0xBC -> MACRON
-    u'\xa8'     #  0xBD -> DIAERESIS
-    u'\xb4'     #  0xBE -> ACUTE ACCENT
-    u'\xd7'     #  0xBF -> MULTIPLICATION SIGN
-    u'{'        #  0xC0 -> LEFT CURLY BRACKET
-    u'A'        #  0xC1 -> LATIN CAPITAL LETTER A
-    u'B'        #  0xC2 -> LATIN CAPITAL LETTER B
-    u'C'        #  0xC3 -> LATIN CAPITAL LETTER C
-    u'D'        #  0xC4 -> LATIN CAPITAL LETTER D
-    u'E'        #  0xC5 -> LATIN CAPITAL LETTER E
-    u'F'        #  0xC6 -> LATIN CAPITAL LETTER F
-    u'G'        #  0xC7 -> LATIN CAPITAL LETTER G
-    u'H'        #  0xC8 -> LATIN CAPITAL LETTER H
-    u'I'        #  0xC9 -> LATIN CAPITAL LETTER I
-    u'\xad'     #  0xCA -> SOFT HYPHEN
-    u'\xf4'     #  0xCB -> LATIN SMALL LETTER O WITH CIRCUMFLEX
-    u'\xf6'     #  0xCC -> LATIN SMALL LETTER O WITH DIAERESIS
-    u'\xf2'     #  0xCD -> LATIN SMALL LETTER O WITH GRAVE
-    u'\xf3'     #  0xCE -> LATIN SMALL LETTER O WITH ACUTE
-    u'\xf5'     #  0xCF -> LATIN SMALL LETTER O WITH TILDE
-    u'}'        #  0xD0 -> RIGHT CURLY BRACKET
-    u'J'        #  0xD1 -> LATIN CAPITAL LETTER J
-    u'K'        #  0xD2 -> LATIN CAPITAL LETTER K
-    u'L'        #  0xD3 -> LATIN CAPITAL LETTER L
-    u'M'        #  0xD4 -> LATIN CAPITAL LETTER M
-    u'N'        #  0xD5 -> LATIN CAPITAL LETTER N
-    u'O'        #  0xD6 -> LATIN CAPITAL LETTER O
-    u'P'        #  0xD7 -> LATIN CAPITAL LETTER P
-    u'Q'        #  0xD8 -> LATIN CAPITAL LETTER Q
-    u'R'        #  0xD9 -> LATIN CAPITAL LETTER R
-    u'\xb9'     #  0xDA -> SUPERSCRIPT ONE
-    u'\xfb'     #  0xDB -> LATIN SMALL LETTER U WITH CIRCUMFLEX
-    u'\xfc'     #  0xDC -> LATIN SMALL LETTER U WITH DIAERESIS
-    u'\xf9'     #  0xDD -> LATIN SMALL LETTER U WITH GRAVE
-    u'\xfa'     #  0xDE -> LATIN SMALL LETTER U WITH ACUTE
-    u'\xff'     #  0xDF -> LATIN SMALL LETTER Y WITH DIAERESIS
-    u'\\'       #  0xE0 -> REVERSE SOLIDUS
-    u'\xf7'     #  0xE1 -> DIVISION SIGN
-    u'S'        #  0xE2 -> LATIN CAPITAL LETTER S
-    u'T'        #  0xE3 -> LATIN CAPITAL LETTER T
-    u'U'        #  0xE4 -> LATIN CAPITAL LETTER U
-    u'V'        #  0xE5 -> LATIN CAPITAL LETTER V
-    u'W'        #  0xE6 -> LATIN CAPITAL LETTER W
-    u'X'        #  0xE7 -> LATIN CAPITAL LETTER X
-    u'Y'        #  0xE8 -> LATIN CAPITAL LETTER Y
-    u'Z'        #  0xE9 -> LATIN CAPITAL LETTER Z
-    u'\xb2'     #  0xEA -> SUPERSCRIPT TWO
-    u'\xd4'     #  0xEB -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
-    u'\xd6'     #  0xEC -> LATIN CAPITAL LETTER O WITH DIAERESIS
-    u'\xd2'     #  0xED -> LATIN CAPITAL LETTER O WITH GRAVE
-    u'\xd3'     #  0xEE -> LATIN CAPITAL LETTER O WITH ACUTE
-    u'\xd5'     #  0xEF -> LATIN CAPITAL LETTER O WITH TILDE
-    u'0'        #  0xF0 -> DIGIT ZERO
-    u'1'        #  0xF1 -> DIGIT ONE
-    u'2'        #  0xF2 -> DIGIT TWO
-    u'3'        #  0xF3 -> DIGIT THREE
-    u'4'        #  0xF4 -> DIGIT FOUR
-    u'5'        #  0xF5 -> DIGIT FIVE
-    u'6'        #  0xF6 -> DIGIT SIX
-    u'7'        #  0xF7 -> DIGIT SEVEN
-    u'8'        #  0xF8 -> DIGIT EIGHT
-    u'9'        #  0xF9 -> DIGIT NINE
-    u'\xb3'     #  0xFA -> SUPERSCRIPT THREE
-    u'\xdb'     #  0xFB -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
-    u'\xdc'     #  0xFC -> LATIN CAPITAL LETTER U WITH DIAERESIS
-    u'\xd9'     #  0xFD -> LATIN CAPITAL LETTER U WITH GRAVE