def content_type_to_charset(content_type):
    match = re.search(charset_pattern, content_type)
    if match:
        return match.group('charset')
Return charset part of content-type header.
dataset/ETHPy150Open benoitbryon/django-downloadview/django_downloadview/utils.py/content_type_to_charset