utf-8 characters are replaced by " " in git bash

Asked

Viewed 58 times

-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 answer

-1

tries to put # -*- coding: utf-8 -*- at the beginning of the code, it kind of forces the encoding to utf-8 in Python.

  • 1

    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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.