Use GB18030 for chinese locale to correctly map some utf8 symbols.

Fixes https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/issues/2590
This commit is contained in:
EBK21 2023-04-02 19:13:31 +08:00
parent 362287543b
commit cc28f0681e

View file

@ -40,6 +40,8 @@ logger = logging.getLogger('cli')
class LegendaryCLI:
def __init__(self, override_config=None, api_timeout=None):
if sys.stdout.encoding == 'gbk' :
sys.stdout.reconfigure(encoding='gb18030')
self.core = LegendaryCore(override_config, timeout=api_timeout)
self.logger = logging.getLogger('cli')
self.logging_queue = None