'Return filename as BMP unicode so diplayable in Tk.'

def _filename_to_unicode(self, filename):

    if isinstance(filename, bytes):
        try:
            filename = filename.decode(self.filesystemencoding)
        except UnicodeDecodeError:
            try:
                filename = filename.decode(self.encoding)
            except UnicodeDecodeError:
                filename = filename.decode('iso8859-1')
    return re.sub('[\\U00010000-\\U0010FFFF]', '\\ufffd', filename)
