Fix Windows GUI mode startup for crash with some languages

Fixes: #11612. #11490, #11518, #9179, #9201, #9266
This commit is contained in:
prculley 2020-03-14 09:42:29 -05:00 committed by Paul Culley
parent 0a3a65ffb0
commit d210275a4e

View File

@ -126,7 +126,7 @@ if win():
pass # ok
elif not os.path.isdir(HOME_DIR):
os.makedirs(HOME_DIR)
sys.stdout = sys.stderr = open(logfile, "w")
sys.stdout = sys.stderr = open(logfile, "w", encoding='utf-8')
stderrh = logging.StreamHandler(sys.stderr)
stderrh.setFormatter(form)
stderrh.setLevel(logging.DEBUG)