diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py index dd51062a1f8..e1ca20d90e1 100644 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@ -249,9 +249,6 @@ class IOBinding: firsteol = self.eol_re.search(chars) if firsteol: self.eol_convention = firsteol.group(0) - if isinstance(self.eol_convention, str): - # Make sure it is an ASCII string - self.eol_convention = self.eol_convention.encode("ascii") chars = self.eol_re.sub(r"\n", chars) self.text.delete("1.0", "end") self.set_filename(None)