From cb623818d1545a7b958f778a9cb5775d789dcfd5 Mon Sep 17 00:00:00 2001 From: Jaeho Choi <19642705+comiluv@users.noreply.github.com> Date: Thu, 26 Feb 2026 14:33:19 +0900 Subject: [PATCH] Add UTF-8 encoding to file open operation fixes https://github.com/Davidyz/VectorCode/issues/307 --- src/vectorcode/subcommands/query/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vectorcode/subcommands/query/__init__.py b/src/vectorcode/subcommands/query/__init__.py index 22ab5abc..9c469894 100644 --- a/src/vectorcode/subcommands/query/__init__.py +++ b/src/vectorcode/subcommands/query/__init__.py @@ -151,7 +151,7 @@ def make_output_path(path: str, absolute: bool) -> str: if not os.path.isfile(io_path): logger.warning(f"{io_path} is no longer a valid file.") continue - with open(io_path) as fin: + with open(io_path, encoding = "utf-8") as fin: structured_result.append({"path": output_path, "document": fin.read()}) else: res = cast(Chunk, res)