Mime type conversion package.
|
need_guess(mimetype,
encoding)
return True if we can complete given mimetype / encoding information |
source code
|
|
|
|
|
guess_encoding(buffer,
fallbackencoding=None)
try to guess encoding from a buffer |
source code
|
|
|
guess_mimetype_and_encoding(format=None,
encoding=None,
data=None,
filename=None,
fallbackencoding=None,
fallbackmimetype=u'application/octet-stream') |
source code
|
|
|
|
|
xml_escape(data)
escapes XML forbidden characters in attributes and PCDATA |
source code
|
|
|
html_unescape(data)
unescapes XML/HTML entities |
source code
|
|
|
|
|
register_pygments_transforms(engine,
verb=True) |
source code
|
|
|
register_base_transforms(engine,
verb=True) |
source code
|
|
|
chardet = None
hash(x)
|
|
DEFAULT_ENCODING = locale.getpreferredencoding(do_setlocale= F...
|
|
BINARY_ENCODINGS = set(('gzip', 'bzip2', 'base64'))
|
|
TEXT_MIMETYPES = set(('application/xml', 'application/xhtml+xm...
|
|
UNICODE_POLICY = 'strict'
|
|
CHARSET_DECL_RGX = re.compile('(?:charset|(?:(?:en)?coding))[=...
|
|
CHARSET_DECL_SEARCH_SIZE = 512
|
|
CHARDET_MIN_SIZE = 20
|
|
CHARDET_CONFIDENCE_THRESHOLD = 0.75
|
|
CONTROL_CHARS = [chr(ci) for ci in range(32)]
|
|
TR_CONTROL_CHARS = [' ']* len(CONTROL_CHARS)
|
|
ESC_CAR_TABLE = string.maketrans(''.join(CONTROL_CHARS), ''.jo...
|
|
ESC_UCAR_TABLE = unicode(ESC_CAR_TABLE, 'latin1')
|