mirror of https://gitlab.com/pamhyr/pamhyr2
Solver: CommandLine: Try fix Windows encoding crash.
parent
ee6b2a94eb
commit
441a064d84
|
|
@ -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)
|
||||||
|
|
||||||
#######
|
#######
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue