It must be a trivial task but I can't handle it. I have json that looks like this.
{'
city': u'\\u0410\\u0431\\u0430\\u043a\\u0430\\u043d',
'language':{
u'\\u0410\\u043d\\u0433\\u043b\\u0438\\u0439\\u0441\\u043a\\u0438\\u0439': 5608,
u'\\u0418\\u0442\\u0430\\u043b\\u044c\\u044f\\u043d\\u0441\\u043a\\u0438\\u0439': 98
}
},
I'm trying to convert the unicode strings into utf-8.
string=u'\u0410\u0431\u0430\u043a\u0430\u043d'
string.encode('utf-8')
I've got
'\xd0\x90\xd0\xb1\xd0\xb0\xd0\xba\xd0\xb0\xd0\xbd'
Instead of:
u'Абакан'
What am I doing wrong?