import unicodedata


def encode_scroll(text):
    """Encode text in the valid scroll file utf32 encoding. Returns encoded bytes."""
    text = unicodedata.normalize('NFC', text)
    text = ''.join((char for char in text if not unicodedata.combining(char)))
    return text.encode('utf-32-be')