def get_file(fn):
    """return a sorted list of lines from the file
    """
    data = []
    f_in = open(fn)
    try:
        with f_in:
            data = sorted(f_in.readlines())
    except UnicodeDecodeError:
        f_in = open(fn, encoding='latin-1')
        with f_in:
            data = sorted(f_in.readlines())
    return data