def extract_content_type_encoding(content_type_string):
    """
    Extract the content type and encoding information.
    """
    charset = ""
    content_type = ""
    for part in content_type_string.split(";"):
        part = part.strip().lower()
        if part.startswith("charset"):
            charset = part.split("=")[1]
            charset = charset.replace("-", "_")
        else:
            content_type = part

    return (content_type, charset)