summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-01-17 04:43:58 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-01-17 04:43:58 (GMT)
commitc5e8935d90d0bece6f72ab7a209d17b0bacd160d (patch)
treed957ee0cc1f64a8701edd15d242340077f97683e /Lib/idlelib
parent4ffee6157a0c41dcb67cc7d9d3676292c9a33932 (diff)
downloadcpython-c5e8935d90d0bece6f72ab7a209d17b0bacd160d.zip
cpython-c5e8935d90d0bece6f72ab7a209d17b0bacd160d.tar.gz
cpython-c5e8935d90d0bece6f72ab7a209d17b0bacd160d.tar.bz2
Issue #25905: Specify 'ascii' encoding for README.txt and NEWS.txt.
Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/CREDITS.txt2
-rw-r--r--Lib/idlelib/aboutDialog.py9
2 files changed, 7 insertions, 4 deletions
diff --git a/Lib/idlelib/CREDITS.txt b/Lib/idlelib/CREDITS.txt
index 5ff599d..3a50eb8 100644
--- a/Lib/idlelib/CREDITS.txt
+++ b/Lib/idlelib/CREDITS.txt
@@ -24,7 +24,7 @@ Noam Raphael (Code Context, Call Tips, many other patches), and Chui Tey (RPC
integration, debugger integration and persistent breakpoints).
Scott David Daniels, Tal Einat, Hernan Foffani, Christos Georgiou,
-Jim Jewett, Martin v. Löwis, Jason Orendorff, Guilherme Polo, Josh Robb,
+Jim Jewett, Martin v. Löwis, Jason Orendorff, Guilherme Polo, Josh Robb,
Nigel Rowe, Bruce Sherwood, Jeff Shute, and Weeble have submitted useful
patches. Thanks, guys!
diff --git a/Lib/idlelib/aboutDialog.py b/Lib/idlelib/aboutDialog.py
index ef8e2de..40ea8ec 100644
--- a/Lib/idlelib/aboutDialog.py
+++ b/Lib/idlelib/aboutDialog.py
@@ -110,6 +110,7 @@ class AboutDialog(Toplevel):
command=self.ShowIDLECredits)
idle_credits_b.pack(side=LEFT, padx=10, pady=10)
+ # License, et all, are of type _sitebuiltins._Printer
def ShowLicense(self):
self.display_printer_text('About - License', license)
@@ -119,14 +120,16 @@ class AboutDialog(Toplevel):
def ShowPythonCredits(self):
self.display_printer_text('About - Python Credits', credits)
+ # Encode CREDITS.txt to utf-8 for proper version of Loewis.
+ # Specify others as ascii until need utf-8, so catch errors.
def ShowIDLECredits(self):
- self.display_file_text('About - Credits', 'CREDITS.txt', 'iso-8859-1')
+ self.display_file_text('About - Credits', 'CREDITS.txt', 'utf-8')
def ShowIDLEAbout(self):
- self.display_file_text('About - Readme', 'README.txt')
+ self.display_file_text('About - Readme', 'README.txt', 'ascii')
def ShowIDLENEWS(self):
- self.display_file_text('About - NEWS', 'NEWS.txt')
+ self.display_file_text('About - NEWS', 'NEWS.txt', 'ascii')
def display_printer_text(self, title, printer):
printer._Printer__setup()