From 1a7e9eeeec156090fbda60ef2ce6179aa54dc70e Mon Sep 17 00:00:00 2001 From: Anthony Samms Date: Fri, 21 Nov 2025 23:26:17 -0500 Subject: [PATCH] Update PyTaiko.py --- PyTaiko.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PyTaiko.py b/PyTaiko.py index 63757aa..405b51d 100644 --- a/PyTaiko.py +++ b/PyTaiko.py @@ -141,6 +141,10 @@ def main(): force_dedicated_gpu() global_data.config = get_config() log_level = global_data.config["general"]["log_level"] + if sys.platform == 'win32': + import io + sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') + sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace') colored_formatter = ColoredFormatter('[%(levelname)s] %(name)s: %(message)s') plain_formatter = logging.Formatter('[%(levelname)s] %(name)s: %(message)s') console_handler = logging.StreamHandler()