import unicodedata
import re


def get_safe_filename(value: str, i: int) -> str:
    """
    Transform file name so it will be NTFS-compliant.

    Add `i` to file name (to beginning), remove illegal characters and
    leading and trailing whitespaces.
    """
    value = unicodedata.normalize('NFKC', '{:05}-{}'.format(i, value.strip()))
    return re.sub(r'[\<\>\:\"\/\\\|\?\*]', '', value).strip()