Pycharm 下os.system执行命令输出乱码
在Pycharm中 ,运行Python代码os.system('ipconfig') 输出结果是乱码。
如下:
解决方法:
1:File-->Settings
2:Settings-->Editor-->File Encodings:把Global Encoding 修改为GBK,修改之后应用,点击OK。
修改之后的运行效果:
在Pycharm中 ,运行Python代码os.system('ipconfig') 输出结果是乱码。
如下:
解决方法:
1:File-->Settings
2:Settings-->Editor-->File Encodings:把Global Encoding 修改为GBK,修改之后应用,点击OK。
修改之后的运行效果: