Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/f/l/flanker-0.4.14/flanker/mime/message/charsets.py   flanker(Download)
import regex as re
from flanker.mime.message import errors
from flanker.utils import to_utf8, to_unicode
 
 
    charset = _translate_charset(charset)
 
    return to_unicode(value, charset=charset)
 
 

src/f/l/flanker-HEAD/flanker/mime/message/charsets.py   flanker(Download)
import regex as re
from flanker.mime.message import errors
from flanker.utils import to_utf8, to_unicode
 
 
    charset = _translate_charset(charset)
 
    return to_unicode(value, charset=charset)
 
 

src/f/l/flanker-0.4.14/flanker/mime/message/headers/parsing.py   flanker(Download)
from flanker.mime.message.headers.wrappers import ContentType, WithParams
from flanker.mime.message.errors import DecodingError
from flanker.utils import to_unicode, is_pure_ascii
 
MAX_LINE_LENGTH = 10000
def parse_header_value(name, val):
    if not is_pure_ascii(val):
        if parametrized.is_parametrized(name, val):
            raise DecodingError("Unsupported value in content- header")
        return to_unicode(val)

src/f/l/flanker-HEAD/flanker/mime/message/headers/parsing.py   flanker(Download)
from flanker.mime.message.headers.wrappers import ContentType, WithParams
from flanker.mime.message.errors import DecodingError
from flanker.utils import to_unicode, is_pure_ascii
 
MAX_LINE_LENGTH = 10000
def parse_header_value(name, val):
    if not is_pure_ascii(val):
        if parametrized.is_parametrized(name, val):
            raise DecodingError("Unsupported value in content- header")
        return to_unicode(val)