Pycharm 下os.system執行命令輸出亂碼

在Pycharm中 ,運行Python代碼os.system('ipconfig') 輸出結果是亂碼。 如下: 解決方法: 1:File-->Settings 2:Settings-->Editor-->File Encodings:把Global Encoding 修改爲GBK,修改之後應用,點擊OK。 修改之後的運行效果:
相關文章
相關標籤/搜索