Skip to content

Commit 3567651

Browse files
committed
Issue #25905: Specify 'ascii' encoding for README.txt and NEWS.txt.
Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
1 parent 80538e9 commit 3567651

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Lib/idlelib/CREDITS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Noam Raphael (Code Context, Call Tips, many other patches), and Chui Tey (RPC
2424
integration, debugger integration and persistent breakpoints).
2525

2626
Scott David Daniels, Tal Einat, Hernan Foffani, Christos Georgiou,
27-
Jim Jewett, Martin v. L�wis, Jason Orendorff, Guilherme Polo, Josh Robb,
27+
Jim Jewett, Martin v. Löwis, Jason Orendorff, Guilherme Polo, Josh Robb,
2828
Nigel Rowe, Bruce Sherwood, Jeff Shute, and Weeble have submitted useful
2929
patches. Thanks, guys!
3030

Lib/idlelib/aboutDialog.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def CreateWidgets(self):
111111
command=self.ShowIDLECredits)
112112
idle_credits_b.pack(side=LEFT, padx=10, pady=10)
113113

114+
# License, et all, are of type _sitebuiltins._Printer
114115
def ShowLicense(self):
115116
self.display_printer_text('About - License', license)
116117

@@ -120,14 +121,16 @@ def ShowCopyright(self):
120121
def ShowPythonCredits(self):
121122
self.display_printer_text('About - Python Credits', credits)
122123

124+
# Encode CREDITS.txt to utf-8 for proper version of Loewis.
125+
# Specify others as ascii until need utf-8, so catch errors.
123126
def ShowIDLECredits(self):
124-
self.display_file_text('About - Credits', 'CREDITS.txt', 'iso-8859-1')
127+
self.display_file_text('About - Credits', 'CREDITS.txt', 'utf-8')
125128

126129
def ShowIDLEAbout(self):
127-
self.display_file_text('About - Readme', 'README.txt')
130+
self.display_file_text('About - Readme', 'README.txt', 'ascii')
128131

129132
def ShowIDLENEWS(self):
130-
self.display_file_text('About - NEWS', 'NEWS.txt')
133+
self.display_file_text('About - NEWS', 'NEWS.txt', 'ascii')
131134

132135
def display_printer_text(self, title, printer):
133136
printer._Printer__setup()

0 commit comments

Comments
 (0)