简体   繁体   中英

python syntax error : non-ascii character

Hi I'm trying understand why I'm getting this error.

when I deploy my project on google appengine, getting error like below

SyntaxError: Non-ASCII character '\\xea' in file /base/data/home/apps/s~frikijihyo/1.377756632466273994/app/controllers.py on line 32, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

my code: python

    # -*- coding: utf-8 -*-

    flash(u'Korean 게시글을 작성했습니다.', 'success')
    return redirect(url_for('article_list'))

i wrote coding: utf-8 .

what is 'character \\xea'? how can i solve this problem?

what is 'character \\xea'?

\\xea is the first byte of the utf-8 encoding of '게' . It is the first non-ASCII byte in your source-code file.

how can i solve this problem?

Ensure that the "coding" comment is on one of the first two lines of the file. If the comment appears anywhere else, it has no effect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM