def parse_textarea_ids_or_names(textarea_contents):
    """
    Prepares text to go through format_records().

    Note that textarea_contents is going to be a unicode type as flask builds it
    that way. Output is plain bytes (str type) as the rest of our code
    does not assume unicode types.

    Parameters
        textarea_contents : the text pasted into the textarea.

    Returns
        list of strings, each holding a line of the input.
        Unicode types are transformed to bytes.
    """
    return textarea_contents.encode('utf-8').splitlines()