Home >Backend Development >Python Tutorial >Pycharm Chinese garbled problem summary
Foreword:
I just started learning python these days, and then installed pycharm, but the Chinese garbled problem is really annoying. I searched for it on the Internet for a long time, and it was all written in a mess. Today I finally Let me solve it and summarize my experience here. I hope it can help you.
Question: As shown below, my problem is mainly that when inputting Chinese characters on the console, the following garbled characters will appear
General solution
1.
First, as shown in the picture above, change all the circles in file encoding to utf -8 format
Then click the application below to re-create a py file and write at the beginning (remember, write at the beginning and then enter Chinese)# -*- coding:utf-8 -* -
2.
如果还不行,重新打开设置,设置
3. If it still doesn’t work
Mine is the last step
The above is the detailed content of Pycharm Chinese garbled problem summary. For more information, please follow other related articles on the PHP Chinese website!