def METHOD_NAME(path):
    if path.find('errordocs.py') >= 0: return { 'errordocs_errors' : '' }
    encoding = 'UTF-8'
    errordocs_errors = set()
    try:
        with open(path, 'r') as f:
            errordocs_errors = check_errordocs(f)
    except UnicodeDecodeError:
        encoding = 'ISO-8859-1'
        try:
            with open(path, 'r', encoding=encoding) as f:
                errordocs_errors = check_errordocs(f)
        except Exception:
            encoding = 'unknown'
    return {
        'errordocs_errors': errordocs_errors,
        'encoding': encoding
    }