Skip to content

Commit

Permalink
Merge pull request #1044 from gpt-engineer-org/bug/unicode-files
Browse files Browse the repository at this point in the history
Bug Fix: Unicode files
  • Loading branch information
ATheorell authored Mar 4, 2024
2 parents b29f2c7 + 563e6be commit 0169dd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpt_engineer/applications/cli/file_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def ask_for_files(self) -> FilesDict:
# selected files contains paths that are relative to the project path
try:
# to open the file we need the path from the cwd
with open(Path(self.project_path) / file_path, "r") as content:
with open(
Path(self.project_path) / file_path, "r", encoding="utf-8"
) as content:
content_dict[str(file_path)] = content.read()
except FileNotFoundError:
print(f"Warning: File not found {file_path}")
Expand Down

0 comments on commit 0169dd6

Please sign in to comment.