You need to unquote the parameter:
import urllib

name = urllib.unquote(self.request.get('name'))

On Fri, Mar 27, 2009 at 10:56 AM, Sylvain <[email protected]> wrote:

>
> Hi,
>
> All my app (pages, variables,...) is encoded in UTF-8 and now I'm
> trying to send a parameter ('name') in the url like that :
>
> http://appid.appspot.com/profile?name=François<http://appid.appspot.com/profile?name=Fran%C3%A7ois>Vallé
>
> Server side I get the name info like that and it works fine :
> name = self.request.get('name')
> >> print name
> >> François Vallé
> The WebOb object is a UnicodeMultiDict.
> So everything works fine.
>
> In order to be "cleaner", I wanted to quote/unquote the parameters
> So now my url is like that :
> http://appid.appspot.com/profile?name=Fran%E7ois%20Vall%E9
> Server side I get the name info like and now it doesn't work
> name = self.request.get('name')
> >> print name
> >> Franois Vall
> The WebOb object is MultiDict (not an unciode one)
> So now all special chars are lost.
>
> So my question is how to handle "unicode" parameter properly and
> particularly if we want to quote/unquote them ?
> Currently, I do no quote/unquote and it works fine,...
>
> >
>


-- 

Alkis

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to