Dev Tool/Pycharm

Pycharm 한글 인코딩

#_달 2017. 9. 22. 10:55

Pycharm 에디터에서 한글 주석및 한글 사용 시 아래와 같은 오류가 난다.


SyntaxError: Non-ASCII character '\xec' in file /path/to/python/file.py on line **, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details


해당 .py 파일 맨 상단에 아래와 같은 주석을 추가 하면 해결된다.


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

'Dev Tool > Pycharm' 카테고리의 다른 글

No Python interpreter configured for the project  (0) 2019.06.09
Remove redundant parentheses  (0) 2017.10.07