On Aug 27, 6:51 pm, Piet van Oostrum <p...@cs.uu.nl> wrote: > >>>>> jakecjacobson <jakecjacob...@gmail.com> (j) wrote: > >j> This seems like a real simple newbie question but how can a person > >j> unencode a string? In Perl I use something like: "$part=~ s/\%([A-Fa- > >j> f0-9]{2})/pack('C', hex($1))/seg;" > >j> If I have a string like Word1%20Word2%20Word3 I want to get Word1 > >j> Word2 Word3. > > urllib.unquote(string) > > >j> Would also like to handle special characters like '",(){} > >j> [] etc/ > > What would you like to do with them? Or do you mean to replace %27 by ' etc? > -- > Piet van Oostrum <p...@cs.uu.nl> > URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4] > Private email: p...@vanoostrum.org
Yes, take '%27' and replace with ', etc. -- http://mail.python.org/mailman/listinfo/python-list