Home > other >  Pygame. Display. Set_caption (' Chinese garbled)
Pygame. Display. Set_caption (' Chinese garbled)

Time:12-24

The import pygame
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 with
Try # 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 you

CodePudding user response:

C disk search a Chinese font library, folder in your program, and references

CodePudding user response:

Problem solved,... Set_mode ((800, 600)) just right

CodePudding user response:

Coding format is not the issue

CodePudding user response:

Then I don't see any indentation

CodePudding 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,
  • Related