def read_file_as_lines(filename):
    """Reads the text file as utf-8 and returns an array of lines, dropping all newline and CR characters"""
    with open(filename, "r", encoding="utf-8") as f:
        filelines = [line.replace("\r", "").rstrip("\n") for line in f.readlines()]
    return filelines