I'm creating software in Python
, I'm having problems with string accents.
The program is simple .. It asks questions to the user (name, version, description, etc.) and adds the answers of these questions in the middle of a text file .. In the end it displays the contents of the text file for the user to copy.
But when displaying, the accents do not look right. I'll leave a% of the error for you to see ... I've already tried to put u before the file and even the input for testing and still the error persists.
I gave print
to the file to know which format and is sys.getdefaultencoding()
.
I've tried to put:
-
utf-8
-
# -- coding: UTF-8 --
-
# -- coding: iso-8859-1 --
-
#-- coding: latin-1 --