From db60f80b01509ea7603662eccc98ac041b6d01bf Mon Sep 17 00:00:00 2001 From: ShyRaptor <18635772+shyraptor@users.noreply.github.com> Date: Thu, 1 May 2025 16:13:06 +0200 Subject: [PATCH] specified utf-8 encoding in symbol.py --- src/serena/symbol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/serena/symbol.py b/src/serena/symbol.py index b9e75b2..f49e33f 100644 --- a/src/serena/symbol.py +++ b/src/serena/symbol.py @@ -297,10 +297,11 @@ class SymbolManager: yield root_path = self.lang_server.language_server.repository_root_path abs_path = os.path.join(root_path, relative_path) - with open(abs_path, "w") as f: + with open(abs_path, "w", encoding="utf-8") as f: f.write(file_buffer.contents) self.agent.mark_file_modified(relative_path) + @contextmanager def _edited_symbol_location(self, location: SymbolLocation) -> Iterator[Symbol]: symbol = self.find_by_location(location)