def string_to_onlyascii(string):
    """
    Filter out emoji and non-printable characters.
    """
    valids = [item for item in string if item.isascii() and item.isprintable()]
    return "".join(valids)