P
P
prostiti2021-08-06 17:43:37
Python
prostiti, 2021-08-06 17:43:37

How to solve encoding error?

How to solve this error?
SyntaxError: Non-UTF-8 code starting with '\xd1' in file ..\Desktop\di.py on line 70, but no encoding declared; see python.org/dev/peps/pep-0263 for details

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmshar, 2021-08-06
@prostiti

First, mistakes are not solved. Solve homework assignments given to you at school. Errors are corrected.
Secondly, did you yourself follow the link that was given? Have you read it? Dismantled? Have you tried what it says there? Or have you left that pleasure to others? In homework, this is called a hint. Or cheating from a neighbor. And it's not very welcome.
And finally, one of the recipes that you are offered at the link is to put it as the first line of your script.
# -*- coding: utf-8 -*-
But since we don’t know what OS you have, nor what localizations you have, nor what kind of IDE, or even what version of Python you have, you may have to experiment with these "magic comments" as well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question