SyntaxError: python Arabic encoding
<p>I have this Code -I am using Python 2.7- :</p>

<pre><code>#!/usr/bin/python
# -*- Coding: UTF-8 -*-
import nltk
from nltk.tokenize import StanfordTokenizer
sentence = u"Ø§ÙØ³ÙØ§Ù Ø¹ÙÙÙÙ Ù Ø±Ø­ÙØ© Ø§ÙÙÙ Ù Ø¨Ø±ÙØ§ØªÙ"
print StanfordTokenizer().tokenize(sentence)
</code></pre>

<p>I saved the code in a file called example.py, when I write python example.py in the terminal I get the following error:</p>

<pre><code>File "example.py", line 5 
SyntaxError: Non-ASCII character '\xd8' in file example.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
</code></pre>

<p>I already declared the type of encoding as UTF-8. So what is the problem? However, if I run the code line by line in the terminal it is working and no error.</p>

<blockquote>
  <p>... the first or second line must match the regular
      expression "^[ \t\v]<em>#.</em>?coding[:=][ \t]*([-_.a-zA-Z0-9]+)".</p>
</blockquote>

<p><a href="https://www.python.org/dev/peps/pep-0263/" rel="nofollow">source</a></p>

<p>Your encoding declaration does not match that regex. The <code>c</code> needs to be lowercase.</p>

python encoding arabic