The import sys
Pygame. The init ()
Screen=pygame. Display. Set_mode ([800600])
Pygame. Display. Set_caption (' Chinese garbled)
Screen. The fill ((0, 0, 0))
While True:
For the event in pygame. Event. The get () :
If the event. The type==pygame. QUIT:
sys.exit()
CodePudding user response:
At the top of the page withTry # coding=utf-8
CodePudding user response:
Thank you, I've tried does not work, I put the computer into Chinese, also not line,CodePudding user response:
While the indentation is behind the show with youCodePudding user response:
C disk search a Chinese font library, folder in your program, and referencesCodePudding user response:
Problem solved,... Set_mode ((800, 600)) just rightCodePudding user response:
Coding format is not the issueCodePudding user response:
Then I don't see any indentationCodePudding user response:
1. Your system is Windows, or other (Mac? Linux?2. Trouble reference:
Learn to map and post code - CSDN, BBS BBS Python beginner, small white common errors and problems
Good post format (with color) code
Then others can help you,