Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
258 views
in Technique[技术] by (71.8m points)

VS2013+PTVS,python编码问题

1.调试,input('中文'),乱码
2.调试,print('中文'),正常
3.不调试,input('中文'),正常
4.不调试,print('中文'),正常

页面编码方式已经加了“# -- coding:utf-8 --”

这是调试模式下的截图:
clipboard.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

把UTF8改成GBK试试,看看会不会乱码。如果不会乱码的话说明是Windows CMD的锅,你别理就行了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...