import unicodedata


def should_unicode_escape(char):
    """Determine if a character needs a unicode escape sequence."""
    if char in " \b\f\n\r\t":
        return False

    category = unicodedata.category(char)
    return category[0] in "CZ"