Skip to content

Commit b77f90e

Browse files
fix: ensure UTF-8 encoding when reading text files in ingestion helper
1 parent b7ee437 commit b77f90e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

private_gpt/components/ingest/ingest_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _load_file_to_documents(file_name: str, file_data: Path) -> list[Document]:
8989
)
9090
# Read as a plain text
9191
string_reader = StringIterableReader()
92-
return string_reader.load_data([file_data.read_text()])
92+
return string_reader.load_data([file_data.read_text(encoding="utf8")])
9393

9494
logger.debug("Specific reader found for extension=%s", extension)
9595
documents = reader_cls().load_data(file_data)

0 commit comments

Comments
 (0)