Im getting this data on request.vars from Google forms onsubmit event.

u'Sistema de Gest\xe3o\x00 \x00d\x00a\x00 \x00Q\x00u\x00'

how do i convert it to
"Sistema de Gestão da Qualidade"

i tried urllib.unquote(x).decode('utf-8')  in my controller
def getit():
    ret={}
    for x in request.vars:
        temp=urllib.unquote(x).decode("utf-8")
        ret[x]=request.vars[x];
    db.responses.insert(allresponses=ret)
but my responses.allreponses document is saved as the same value
{u'Sistema de Gest\xe3o\x00 \x00d\x00a\x00 \x00Q\x00u\x00': 'testing'}
Allresponses field is a JSON Field



Regards
António

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to