Skip to content

Commit 2fa6a9a

Browse files
committed
fix: set UTF-8 encoding for Windows CLI compatibility
1 parent 67f0ea7 commit 2fa6a9a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

openspace_openhands_evolution/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
自优化全息进化系统 - 生产级 AI 编程助手
55
"""
66

7+
# Set UTF-8 encoding for Windows compatibility
8+
import os
9+
if sys.platform == 'win32':
10+
os.environ['PYTHONIOENCODING'] = 'utf-8'
11+
import io
12+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
13+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
14+
715
import asyncio
816
import argparse
917
import sys

0 commit comments

Comments
 (0)