Package web2py :: Package gluon :: Module decoder
[hide private]
[frames] | no frames]

Module decoder

source code

Functions [hide private]
 
autoDetectXMLEncoding(buffer)
buffer -> encoding_name The buffer should be at least 4 bytes long.
source code
 
decoder(buffer) source code
Variables [hide private]
  autodetect_dict = {(0, 0, 254, 255): 'ucs4_be', (0, 60, 0, 63)...
Function Details [hide private]

autoDetectXMLEncoding(buffer)

source code 
buffer -> encoding_name
The buffer should be at least 4 bytes long.
    Returns None if encoding cannot be detected.
    Note that encoding_name might not have an installed
    decoder (e.g. EBCDIC)


Variables Details [hide private]

autodetect_dict

Value:
{(0, 0, 254, 255): 'ucs4_be',
 (0, 60, 0, 63): 'utf_16_be',
 (60, 0, 63, 0): 'utf_16_le',
 (60, 63, 120, 109): 'utf_8',
 (76, 111, 167, 148): 'EBCDIC',
 (254, 255, None, None): 'utf_16_be',
 (255, 254, None, None): 'utf_16_le',
 (255, 254, 0, 0): 'ucs4_le'}