Hi,
Using this usual REST code in controller :
def api_users():
response.view = 'generic.json' # or 'generic.' + request.extension
def GET(*args,**vars):
patterns = [
"/user[auth_user]",
"/user/{auth_user.id}",
"/user/{auth_user.id}/:field",
"/user/{auth_user.first_name.contains}/{auth_user.last_name.contains}/{auth_user.dob_pid7.eq}"
]
db.auth_user.created_by.readable = db.auth_user.modified_by.readable = db.auth_user.created_on.readable = db.auth_user.modified_on.readable = True
parser = db.parse_as_rest(patterns, args, vars)
data = parser.response
if parser.status == 200:
return dict(content=data)
else:
raise HTTP(parser.status, parser.error)
with the last pattern, if I use character with accent e.g:
the query do not find match as it is not interpreted as:
"ma\u00eft" for first vars and
"li\u00e9" for the second vars
which is the encoding I find when I do the request /user/ma/li .
How can I correct the encoding transcription so that the request comply to the format:
?
Mike