Problem:
When using vscode to write python, I use the run code plug-in. When writing the code, I found that print('Chinese') was garbled in the terminal window.
Solution:
Method 1:
Add a system variable to the environment variable
Variable name: PYTHONIOENCODING;
Variable value: utf-8
Method 2:
You can specify the use of UTF-8 encoding by setting compilation parameters :"python": "set PYTHONIOENCODING=utf8 && python"
##Modify to: Recommended related articles and tutorials :The above is the detailed content of vscode uses the [run code] plug-in to output Chinese garbled characters. For more information, please follow other related articles on the PHP Chinese website!