This might be a very simple problem but i am just not able to solve it.
In my python console I do :
request.request.data.get('comment')
I get {u'price': u'21', u'unit': u'30\xd730', u'name': u'test', u'comments': u'check'}
The value of comment originally is :
"comments" : "check",
"name" : "test",
"price" : "21",
"unit" : "30×30"(multiplication sign x)
How can I solve this such that I get request.request.data.get('comment') as {u'price': u'21', u'unit': u'30x30', u'name': u'test', u'comments': u'check'}?
I tried using:
request.request.data.get('comment').get('unit').encode('utf-8')
but it returns '30\xc3\x9730'
I want to convert /xd to ascii.
strfunction to get stringstr(request.request.data.get('comment'))