mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Solver: CommandLine: Try fix Windows encoding crash.
This commit is contained in:
1 parent
ee6b2a94eb
commit
441a064d84
1 file changed
+4
-2
@@ -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)
|
||||
|
||||
#######
|
||||
|
||||
Reference in new issue
Block a user