-1
When I run my python code, if in that code you have a print, and that print receives a string with utf-8 characters, the letter is replaced by in the console.
code:
print('Olá')
output
ol▒
-1
When I run my python code, if in that code you have a print, and that print receives a string with utf-8 characters, the letter is replaced by in the console.
code:
print('Olá')
output
ol▒
-1
tries to put # -*- coding: utf-8 -*-
at the beginning of the code, it kind of forces the encoding to utf-8 in Python.
Browser other questions tagged python character-encoding utf-8
You are not signed in. Login or sign up in order to post.
This practice is not a "magic formula to solve all stress problems". in particular, if the problem was this, the A.P. would have a "Syntax error", and the program would not even be executed.
– jsbueno