This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Rosuav, kbk, roger.serwy, serhiy.storchaka, terry.reedy
Date 2015-12-18.12:29:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450441792.4.0.635729771057.issue25905@psf.upfronthosting.co.za>
In-reply-to
Content
When open the About IDLE dialog and press the README button on bottom line, I get the UnicodeDecodeError:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 1548, in __call__
    return self.func(*args)
  File "/home/serhiy/py/cpython/Lib/idlelib/aboutDialog.py", line 127, in ShowIDLEAbout
    self.display_file_text('About - Readme', 'README.txt')
  File "/home/serhiy/py/cpython/Lib/idlelib/aboutDialog.py", line 139, in display_file_text
    textView.view_file(self, title, fn, encoding)
  File "/home/serhiy/py/cpython/Lib/idlelib/textView.py", line 74, in view_file
    contents = file.read()
  File "/home/serhiy/py/cpython/Lib/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 72: invalid start byte

That is because IDLE opens the Lib/idlelib/README.txt file with default (locale) encoding, while it contains the RIGHT SINGLE QUOTATION MARK character encoded with the CP1252 encoding and non-decodable with UTF-8.

I think IDLE should open all distributed files with UTF-8 encoding. Lib/idlelib/CREDITS.txt and Lib/idlelib/README.txt should be recoded to UTF-8.
History
Date User Action Args
2015-12-18 12:29:52serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, kbk, roger.serwy, Rosuav
2015-12-18 12:29:52serhiy.storchakasetmessageid: <1450441792.4.0.635729771057.issue25905@psf.upfronthosting.co.za>
2015-12-18 12:29:52serhiy.storchakalinkissue25905 messages
2015-12-18 12:29:51serhiy.storchakacreate