mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Fix: fix UTF-8 encode on non-UTF-8 systems
- added CN and JP version too
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import codecs
|
||||
import os
|
||||
import sys
|
||||
|
||||
from gooey import Gooey, GooeyParser
|
||||
import module.config.server as server
|
||||
@@ -8,6 +9,11 @@ from module.config.dictionary import dic_true_eng_to_eng, dic_eng_to_true_eng
|
||||
from module.config.update import get_config
|
||||
from module.logger import pyw_name
|
||||
|
||||
if sys.stdout.encoding != 'UTF-8':
|
||||
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')
|
||||
if sys.stderr.encoding != 'UTF-8':
|
||||
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer, 'strict')
|
||||
|
||||
|
||||
@Gooey(
|
||||
optional_cols=2,
|
||||
|
||||
Reference in New Issue
Block a user