fix: Change file reading error handling from "ignore" to "replace"

This commit is contained in:
Paul Gauthier 2025-02-15 12:00:39 -08:00 committed by Paul Gauthier (aider)
parent 108ce18d51
commit 69fcc3acd7
2 changed files with 28 additions and 2 deletions

View file

@ -368,7 +368,7 @@ class InputOutput:
return self.read_image(filename)
try:
with open(str(filename), "r", encoding=self.encoding, errors="ignore") as f:
with open(str(filename), "r", encoding=self.encoding, errors="replace") as f:
return f.read()
except FileNotFoundError:
if not silent: