This is the unicode that I have defined at the top of my program
#!/usr/bin/env python
# -*- coding: utf-8 -*-
And yet I still get this error
SyntaxError: Non-ASCII character '\xfe' in file C:/Users/aaron/Desktop/Python/Bicycle_Diagnosis_System/Main.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
I have looked at the website it wprovides and trawled other websites and still can't find the answer. Any ideas (im using pycharm community edition as my IDE if that affects it)
Any help is much appreciated!
\xfein the first line could be the start of a byte order mark. This would mean that your file was encoded with UTF-16 (on Windows often called "Unicode") on a big-endian machine. Not only is your encoding declaration wrong in that case: UTF-16 isn't allowed as source code encoding altogether, because it isn't backwards-compatible to ASCII.