import re


def escape_filename(value):
    """ Escape forbidden symbols in a file name.
    """
    value = re.sub(r'[<>:\/\\|?*\'"’“”„«»…–—¡¿]', ' ', str(value))
    value = value.encode('ascii', errors='replace').decode().replace('?', ' ')
    value = value.strip()
    return value