The title explains well. I installed Notepad ++ to open a Python script on the command line when I click F8, but all Swedish characters look confused when opened in CMD, but are great for example in IDLE.
This simple code example:
print "åäö"
It looks like this .
As you can see, the output of the batch file that I use to open Python in cmd below shows the characters correctly, but not the Python script above it. How to fix it? I just want to show the characters correctly, I did not necessarily use UTF-8.
I open the file in cmd using this method .
Update: Allowed. Added the line "chcp 1252" at the top of the batch file, and then the cls line below it to remove the message about what character encoding it uses. Then I used "# - encoding: cp1252 -" in a python script and changed the font in cmd to Lucida Console. This can be done by clicking the cmd icon in the upper right corner of the cmd window and go to properties.
source
share