From 06a1fcbb0035c664fefc53ddb8df65cc03a537b7 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 22 Jun 2016 04:17:28 -0400 Subject: Issue #27365: Allow non-ascii in idlelib/NEWS.txt, for contributor names. Rest of patch that should not be cherry picked into 3.5.2 final. --- Lib/idlelib/textView.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/idlelib/textView.py') diff --git a/Lib/idlelib/textView.py b/Lib/idlelib/textView.py index 01b2d8f4ab..12ac31962d 100644 --- a/Lib/idlelib/textView.py +++ b/Lib/idlelib/textView.py @@ -76,6 +76,10 @@ def view_file(parent, title, filename, encoding=None, modal=True): tkMessageBox.showerror(title='File Load Error', message='Unable to load file %r .' % filename, parent=parent) + except UnicodeDecodeError as err: + tkMessageBox.showerror(title='Unicode Decode Error', + message=str(err), + parent=parent) else: return view_text(parent, title, contents, modal) -- cgit v1.2.1