I am running a simple: echo print "Hello!!" > prog.py on PowerShell (PS). It was all going well untill I set .py programs to run by default with IDLE.bat.
As soon as I did that, when I type .\prog.py, PowerShell runs Idle, so I had the "brilliant idea" to set .py to run with PS.
I set Idle again as default program for .py, but now I am not able to create my .py files from PS, and I notice that it inserts characters, a carriage return between print and Hello, and spaces between all letters. Like this:
ÿþp r i n t
H e l l o
Running python prog.py I get a SyntaxError, like this:
PS C:\> python prog.py
File "prog.py", line 1
SyntaxError: Non-ASCII character '\xff' in file prog.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Does PS lose the encoding? How can I solve this?
I am using Win10(PSv5.0); Python 2.7.11