import codecs


def read_file(path, char_set='utf-8'):
    """The basic function of reading files.

    :param path: the path of the file to read.
    :param char_set: the character set of the file, default 'utf-8'.
    :return: returns all lines as a list.
    """
    with codecs.open(path, 'r+', encoding=char_set) as f:
        return f.readlines()