from pathlib import Path


def filter_read(filename, encoding='utf-8', errors='strict'):
    """
    Filter to read the content of text files.

    :param filename: Path object or string to the file to read from.
    :param str encoding: The name of the encoding used to decode the content of
     the file.
    :param str errors: Specifies how encoding and decoding errors are to be
     handled. Refer to Python's open() function documentation.

    :return: The totality of the content of the file.
    :rtype: str
    """
    return Path(filename).read_text(encoding='utf-8', errors=errors)