Commit 9335b7a052ab98820cb42cdf40f4ab420e8a1bd9
1 parent
e302dfd5
fix: gbk codec
Showing
1 changed file
with
3 additions
and
0 deletions
sql/tools/convertor.py
| ... | ... | @@ -24,6 +24,9 @@ from typing import Dict, Generator, Optional, Tuple, Union |
| 24 | 24 | |
| 25 | 25 | from simple_ddl_parser import DDLParser |
| 26 | 26 | |
| 27 | +# 避免 Windows 系统使用默认的 GBK 编码 | |
| 28 | +sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf-8', buffering=1) | |
| 29 | + | |
| 27 | 30 | PREAMBLE = """/* |
| 28 | 31 | Yudao Database Transfer Tool |
| 29 | 32 | ... | ... |