How to handle Japanese in Python

While practicing Python for the first time programming, I don't know right or left, but for the time being, as a memorandum for the first school.

When I tried to run Python using ** Atom Runner: script.py ** on Atom, an error was displayed, so how to solve it.

I referred to the UX MILK article

Solved by adding the following line to the script.

# coding: UTF-8

When handling Japanese in a program, it is necessary to specify the character code at the beginning of the program and save the file with the specified character code. To specify the character code of the Python program so that it can handle Japanese (UTF-8), write the following on the first or second line of the program.

And that.

Recommended Posts

How to handle Japanese in Python
How to handle datetime type in python sqlite3
[Python] How to do PCA in Python
How to handle session in SQLAlchemy
How to collect images in Python
How to use SQLite in Python
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
How to use PubChem in Python
How to handle JSON in Ruby, Python, JavaScript, PHP
[Introduction to Python] How to use class in Python?
How to access environment variables in Python
How to dynamically define variables in Python
How to do R chartr () in Python
[Itertools.permutations] How to put permutations in Python
How to work with BigQuery in Python
How to get a stacktrace in python
How to display multiplication table in python
How to display python Japanese with lolipop
How to handle consecutive values in MySQL
How to switch python versions in cloud9
How to adjust image contrast in Python
How to use __slots__ in Python class
How to dynamically zero pad in Python
How to use regular expressions in Python
How to display Hello world in python
How to use is and == in Python
How to write Ruby to_s in Python
How to install Python
Handle markdown in python
Handle Parquet in Python
Japanese output in Python
How to not escape Japanese when dealing with json in python
How to use the C library in Python
How to receive command line arguments in Python
[REAPER] How to play with Reascript in Python
How to clear tuples in a list (Python)
How to generate permutations in Python and C ++
How to implement Discord Slash Command in Python
Summary of how to import files in Python 3
How to simplify restricted polynomial fit in python
How to use Python Image Library in python3 series
How to implement shared memory in Python (mmap.mmap)
How to create a JSON file in Python
Summary of how to use MNIST in Python
[Introduction to Python] How to handle JSON format data
How to specify TLS version in python requests
Use cryptography module to handle OpenSSL in Python
How to notify a Discord channel in Python
How to get the files in the [Python] folder
How to use tkinter with python in pyenv
How to run Leap Motion in non-Apple Python
[Python] How to draw a histogram in Matplotlib
How to output "Ketsumaimo" as standard output in Python
How to make Python Interpreter changes in Pycharm
How to plot autocorrelation and partial autocorrelation in python
How to remove duplicate elements in Python3 list
Handle Ambient data in Python
I wrote python in Japanese
How to install Python [Windows]