1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Zenmap: Ensure files are opened with UTF-8 encoding

This commit is contained in:
dmiller
2025-03-04 17:06:32 +00:00
parent 068dd4b0df
commit 49c25e6431
3 changed files with 6 additions and 5 deletions

View File

@@ -121,7 +121,7 @@ class NdiffCommand(subprocess.Popen):
filename_b
]
self.stdout_file = tempfile.TemporaryFile(
mode="r",
mode="r", encoding="utf-8",
prefix=APP_NAME + "-ndiff-",
suffix=".xml"
)
@@ -131,7 +131,7 @@ class NdiffCommand(subprocess.Popen):
subprocess.Popen.__init__(
self,
command_list,
universal_newlines=True,
universal_newlines=True, encoding="utf-8",
stdout=self.stdout_file,
stderr=subprocess.PIPE,
env=env,