Home  >  Q&A  >  body text

乱码 - VS2013+PTVS,python编码问题

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

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

这是调试模式下的截图:

黄舟黄舟2717 days ago460

reply all(1)I'll reply

  • 阿神

    阿神2017-04-18 10:34:47

    Try changing UTF8 to GBK and see if the characters are garbled. If the code is not garbled, it means Windows CMD is to blame, and you can just ignore it.

    reply
    0
  • Cancelreply