Commit 441a064d authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Solver: CommandLine: Try fix Windows encoding crash.

No related merge requests found
Pipeline #55075 passed with stages
in 3 minutes and 22 seconds
Showing with 4 additions and 2 deletions
+4 -2
...@@ -167,8 +167,10 @@ class CommandLineSolver(AbstractSolver): ...@@ -167,8 +167,10 @@ class CommandLineSolver(AbstractSolver):
repertory, "pamhyr-study-description.txt" repertory, "pamhyr-study-description.txt"
) )
with open(path, "w+") as f: with open(path, "w+", encoding='utf-8') as f:
txt = study.description txt = study.description\
.encode()\
.decode('utf-8', 'replace')
f.write(txt) f.write(txt)
####### #######
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment