Skip to content

Commit

Permalink
Fix EncodingWarnings in text_file.py. Ref #232.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 2, 2024
1 parent f0692cf commit b420f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distutils/text_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def open(self, filename):
"""Open a new file named 'filename'. This overrides both the
'filename' and 'file' arguments to the constructor."""
self.filename = filename
self.file = open(self.filename, errors=self.errors)
self.file = open(self.filename, errors=self.errors, encoding='utf-8')
self.current_line = 0

def close(self):
Expand Down

0 comments on commit b420f2d

Please sign in to comment.