I am using flask.ext.rest to build a api. I want return some chinese string. However, every time I receive "\u7231"(This is a string of length 8). What should I do to receive 爱 ?
from flask import Flask
from flask.ext.restful import reqparse, abort, Api, Resource
class E2C(Resource): # English to Chinglish
def get(self):
chinese = u'爱'
type(chinese) # unicode
return chinese
receiveare you talking about presentation in a browser?receive, I mean from both browser and command line (curl http:...). In either way, I can only get the 8 length string instead of 1 length string