mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38: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
|
||||
|
||||
@@ -9,6 +10,11 @@ from module.config.dictionary import dic_chi_to_eng, dic_eng_to_chi
|
||||
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