def load_utf_text_file(file_, default_encoding='UTF-8', use_utf8_strings=True):
    """
    Loads the specified text file and tries to decode it using one of the UTF encodings.
    :param file_: The path to the loadable text file or a file-like object with a read() method.
    :param default_encoding: The encoding to be used if the file doesn't have a BOM prefix.
    :param use_utf8_strings: Ignored in case of python3, in case of python2 the default
    value of this is True. True means that the loaded json string should be handled as a utf-8
    encoded str instead of a unicode object.
    :return: A unicode object. In case of python2 it can optionally be an str object
    containing utf-8 encoded text.
    """
    if isinstance(file_, my_basestring):
        with open(file_, 'rb') as f:
            buf = f.read()
    else:
        buf = file_.read()
    return decode_utf_text_buffer(buf, default_encoding, use_utf8_strings)