Home > Database > Mysql Tutorial > body text

python character encoding problem

巴扎黑
Release: 2016-12-09 10:33:57
Original
1190 people have browsed it

Recently, because the project needs to use PYTHON script, I quickly learned it. I encountered a problem today and took notes. An error like "Non-UTF-8 code starting with 'xb6' in file xxxxx.py" appears. The cause of the error is explained online: it is a file encoding problem of PYTHON, so according to the official prompt, you need to add #coding = you The encoding to specify.

Secondly, during the debugging process, I found that the statement to convert the file encoding:

#coding = utf-8
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template