I am learning the Bottle framework and a new one for Python. Just stumbled upon this difficulty. When I write a simple method to return an Arabic string, for example:
@route('/hello')
def hello():
return u'ุณูุงู
'
I get this error message in terminal:
Syntax Error: non-ASCII character '\ xd8' in the hello.py file on line 15, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
I imported everything from the bottle and tried to add other methods mentioned in the docs where it talks about โChanging the default encodingโ I could not solve the problem. Therefore, I appreciate your hints.
source
share