def split_ldap_common_name(common_name):
    """Returns firstname, surname tuple
    filters non alphabetical characters to avoid encoding problems"""
    namesplit = common_name.split()
    firstname = namesplit[0]
    surname = ''
    if len(namesplit) > 1:
        surname = namesplit[-1]

    # Filter nonalphabetical.
    firstname = ''.join(c for c in firstname if c.isalpha())
    surname = ''.join(c for c in surname if c.isalpha())

    return (firstname, surname)