I'm trying learning to use encoding declarations in source files reading PEP 263 and I'm experimenting on my own but I got some troubles.
Here's my file cod.py:
# -*- coding: utf-16 -*-
print('ciao')
and I saved it using UTF-16 encoding; now:
antox@antox-pc ~/Scrivania $ python3 cod.py
File "cod.py", line 1
SyntaxError: Non-UTF-8 code starting with '\xff' in file cod.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
So I don't understand where I'm getting wrong.
P.S. I'm using gedit 2.30.4