]> granicus.if.org Git - python/commitdiff
Issue #25905: Specify 'ascii' encoding for README.txt and NEWS.txt.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sun, 17 Jan 2016 04:43:58 +0000 (23:43 -0500)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sun, 17 Jan 2016 04:43:58 +0000 (23:43 -0500)
Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.

Lib/idlelib/CREDITS.txt
Lib/idlelib/aboutDialog.py

index 5ff599dee1abfbefb827d2e38571db4f246e27f8..3a50eb8e7f2ac3d3af638f65b2bb298978ff1869 100644 (file)
@@ -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!
 
index ef8e2decc31e5d124a485d855f5a6647accb24f6..40ea8ecc4a427310ac20b38cbd0a1eba3bb7c7a8 100644 (file)
@@ -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()