fixed an issue with exiting midgame

This commit is contained in:
Jonathan Hite 2025-02-07 23:08:04 -05:00
parent 463c333e48
commit dc5efa2b47
3 changed files with 13 additions and 7 deletions

View file

@ -16,9 +16,11 @@ import logging
import time
import sys
import io
import locale
# Reconfigure stdout to use UTF-8 encoding
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
# Apply UTF-8 fix only if needed
if "utf" not in locale.getpreferredencoding().lower():
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
from config_init import initialize_config, get_interface, init_cli_parser, merge_config
from db_operations import initialize_database