How would I encode the following:
chapter_mapping = {'chapter': ' チャプター'}
so I can call chapter_mapping['chap开发者_开发知识库ter']
. Thank you.
You'll also need to add a header to your file in python 2:
# -*- coding: utf-8 -*-
chapter_mapping = {'chapter': u'チャプター'}
Always use unicode
literals.
chapter_mapping = {'chapter': u' チャプター'}
精彩评论