demo code like this:
#_*_ coding: utf-8 _*_
a = u'北京'
b = u'地图'
c = '{0} {1}'.format(a, b)
when i write this in python file(test.py), and then run 'python test.py'. it will raise Exception like:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
but, when i run a Django, django methon run demo code, it will be ok。
python version and python path is totally same. python version: 2.7.9