import unicodedata
import re


def reduce_display_name(name):
    """Return a reduced version of a display name for comparison with a
    username.
    """
    # Strip out diacritics
    name = ''.join(char for char in unicodedata.normalize('NFD', name)
                   if not unicodedata.combining(char))

    name = re.sub(r'\s+', '_', name)
    name = name.lower()

    return name