LoginSignup
0
0

More than 1 year has passed since last update.

SyntaxError: Non-ASCII character '\xe6' in file

Posted at
SyntaxError: Non-ASCII character '\xe6' in file sample_001.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

文字エンコードの定義をせずに、日本語を使った場合に出るエラー

日本語を扱うには、一番最初に文字エンコードの定義が必要

# coding:utf-8
print("こんにちは")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0