Solver: CommandLine: Try fix Windows encoding crash.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-04-24 09:51:58 +02:00
1 parent ee6b2a94eb
commit 441a064d84
1 file changed
+4 -2
+4 -2
View File
@@ -167,8 +167,10 @@ class CommandLineSolver(AbstractSolver):
repertory, "pamhyr-study-description.txt"
)
with open(path, "w+") as f:
txt = study.description
with open(path, "w+", encoding='utf-8') as f:
txt = study.description\
.encode()\
.decode('utf-8', 'replace')
f.write(txt)
#######