'Create a Unicode string.'

def _decode(self, two_lines, bytes):

    chars = None
    if bytes.startswith(BOM_UTF8):
        try:
            chars = bytes[3:].decode('utf-8')
        except UnicodeDecodeError:
            return (None, False)
        else:
            self.fileencoding = 'BOM'
            return (chars, False)
    try:
        enc = coding_spec(two_lines)
    except LookupError as name:
        tkMessageBox.showerror(title='Error    loading    the    file', message=("The    encoding    '%s'    is    not    known    to    this    Python    installation.    The    file    may    not    display    correctly" % name), master=self.text)
        enc = None
    except UnicodeDecodeError:
        return (None, False)
    if enc:
        try:
            chars = str(bytes, enc)
            self.fileencoding = enc
            return (chars, False)
        except UnicodeDecodeError:
            pass
    try:
        chars = str(bytes, 'ascii')
        self.fileencoding = None
        return (chars, False)
    except UnicodeDecodeError:
        pass
    try:
        chars = str(bytes, 'utf-8')
        self.fileencoding = 'utf-8'
        return (chars, False)
    except UnicodeDecodeError:
        pass
    try:
        self.editwin.text.update()
        enc = askstring('Specify    file    encoding', "The    file's    encoding    is    invalid    for    Python    3.x.\nIDLE    will    convert    it    to    UTF-8.\nWhat    is    the    current    encoding    of    the    file?", initialvalue=locale_encoding, parent=self.editwin.text)
        if enc:
            chars = str(bytes, enc)
            self.fileencoding = None
        return (chars, True)
    except (UnicodeDecodeError, LookupError):
        pass
    return (None, False)
