Reputation: 110163
How would I encode the following:
chapter_mapping = {'chapter': ' チャプター'}
so I can call chapter_mapping['chapter']
. Thank you.
Upvotes: 0
Views: 502
Reputation: 31880
You'll also need to add a header to your file in python 2:
# -*- coding: utf-8 -*-
chapter_mapping = {'chapter': u'チャプター'}
Upvotes: 2
Reputation: 798636
Always use unicode
literals.
chapter_mapping = {'chapter': u' チャプター'}
Upvotes: 1