def __is_utf8(rule_string):
    """
    Takes the string of the rule and parses it to check if there are only utf-8 characters present.
    :param rule_string: the string representation of the yara rule
    :return: true if there are only utf-8 characters in the string
    """
    try:
        rule_string.encode('utf-8')
    except UnicodeEncodeError:
        return False
    else:
        return True