Skip to content

Instantly share code, notes, and snippets.

@MikimotoH
Created December 16, 2014 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikimotoH/eeb34bbb9a8303ac984f to your computer and use it in GitHub Desktop.
Save MikimotoH/eeb34bbb9a8303ac984f to your computer and use it in GitHub Desktop.
python3 windows console (cmd) print unicode
def safeprint(text):
import os,sys
os.write(sys.stdout.fileno(), text.encode(encoding='utf-8'))
sys.stdout.flush()
tt = "思飞通达家电销售管理软件"
safeprint(tt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment