Skip to content

Instantly share code, notes, and snippets.

@xebecnan
xebecnan / win32_utf8_run.py
Last active December 27, 2015 20:49
Windows下正确显示程序打印的UTF8中文
import sys
from subprocess import PIPE, Popen, STDOUT
args = sys.argv[1:]
process = Popen(args, stdout=PIPE, shell=True, stderr=STDOUT)
count = 0
while True:
buff = process.stdout.readline()