Accent error in Visual Studio output

3
print('Olá Python!)

Here's some information on setting up my PC.

  • Windows 10 Pro

  • Cmder

  • Active Code Page: 850

asked by anonymous 20.12.2018 / 14:50

2 answers

1

You're probably using the wrong character encoding .

Your question is probably duplicate , but I'll respond to you as best I can. To fully understand what comes to you at a glance at the post What are the main differences between Unicode, UTF, ASCII, ANSI? , and to close the subject, it is also worth reading this article .

But to solve your problem quickly, I'll cite one last article from SOen which demonstrates a simple guide to changing the encoding in your Visual Studio:

  
  • open the problematic file in Visual Studio.
  •   
  • on the File menu click "Advanced Save Options"
  •   
  • from "Encoding" combo select "Unicode (UTF-8 ..."
  •   
  • click OK.
  •   

Select the type of encoding that meets UTF-8.

    
20.12.2018 / 16:50
1

Below is the details that worked.

This is to edit the settings.json and in code-runner.executorMap, add the following lines:

"code-runner.executorMap": {
    "python": "set PYTHONIOENCODING=utf8 && python"
}

    
20.12.2018 / 22:23