我不会读/写俄语文本,例如:
from configobj import ConfigObj
obj = ConfigObj('config.ini')
mydata = ['вася', 'петя']
obj['users'] = mydata
obj.write()
我得到错误:
obj.write()
File "/usr/lib/python3.4/site-packages/configobj-5.0.6-py3.4.egg/configobj.py", line 2119, in write
UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-13: ordinal not in range(128)
在 python 2.7 上一切正常,但是 3.4 ......请帮助我。我究竟做错了什么?