mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Issue #25905: Specify 'ascii' encoding for README.txt and NEWS.txt.
Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
This commit is contained in:
parent
80538e9dfe
commit
356765194c
2 changed files with 7 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ Noam Raphael (Code Context, Call Tips, many other patches), and Chui Tey (RPC
|
||||||
integration, debugger integration and persistent breakpoints).
|
integration, debugger integration and persistent breakpoints).
|
||||||
|
|
||||||
Scott David Daniels, Tal Einat, Hernan Foffani, Christos Georgiou,
|
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
|
Nigel Rowe, Bruce Sherwood, Jeff Shute, and Weeble have submitted useful
|
||||||
patches. Thanks, guys!
|
patches. Thanks, guys!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ class AboutDialog(Toplevel):
|
||||||
command=self.ShowIDLECredits)
|
command=self.ShowIDLECredits)
|
||||||
idle_credits_b.pack(side=LEFT, padx=10, pady=10)
|
idle_credits_b.pack(side=LEFT, padx=10, pady=10)
|
||||||
|
|
||||||
|
# License, et all, are of type _sitebuiltins._Printer
|
||||||
def ShowLicense(self):
|
def ShowLicense(self):
|
||||||
self.display_printer_text('About - License', license)
|
self.display_printer_text('About - License', license)
|
||||||
|
|
||||||
|
|
@ -120,14 +121,16 @@ class AboutDialog(Toplevel):
|
||||||
def ShowPythonCredits(self):
|
def ShowPythonCredits(self):
|
||||||
self.display_printer_text('About - Python Credits', credits)
|
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):
|
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):
|
def ShowIDLEAbout(self):
|
||||||
self.display_file_text('About - Readme', 'README.txt')
|
self.display_file_text('About - Readme', 'README.txt', 'ascii')
|
||||||
|
|
||||||
def ShowIDLENEWS(self):
|
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):
|
def display_printer_text(self, title, printer):
|
||||||
printer._Printer__setup()
|
printer._Printer__setup()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue