<br>
PyScripter is an open source Python integrated development environment (IDE) developed using Delphi. PyScripter supports Python2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, and can be used according to Need to switch.
">
PyScripter looks like a pretty good python ide
Environment:
PyScripter 2.6.0.0
python3.4
Problem:
PyScripter has a small pit, after opening the file, the Chinese language All become garbled characters. The Chinese characters of the newly created files in PyScripter can be displayed normally, but the Chinese characters are garbled after reopening.
The reason for the Chinese characters of PyScripter:
The reason is that if there is no encoding statement in the file header, Then PyScripter will use ANSI to open the file by default.
And PyScripter's default file template does not have an encoding statement, and the file will not be opened in UTF-8 when it is reopened, so
. Solution:
1. Open the file with another editor, add this line of statement and save it:
# -*- coding: UTF-8 -*-<br>
2. Modify the file template of PyScripter and add this line:
# -*- coding: UTF-8 - *-
<br>
# -*- coding: UTF-8 -*-<br>
The above is the detailed content of Detailed explanation of the solution to the Chinese garbled problem in the python development environment PyScripter. For more information, please follow other related articles on the PHP Chinese website!