Re: How to unencode a string

2009-08-28 Thread jakecjacobson
On Aug 27, 6:51 pm, Piet van Oostrum wrote: > > jakecjacobson (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

Re: How to unencode a string

2009-08-27 Thread Chris Rebert
On Thu, Aug 27, 2009 at 2:49 PM, Chris Rebert wrote: > On Thu, Aug 27, 2009 at 2:10 PM, jakecjacobson wrote: >> This seems like a real simple newbie question but how can a person >> unencode a string?  In Perl I use something like: "$part=~ s/\%([A-Fa- >> f0-9]{2})/pack('C', hex($1))/seg;" >> >> If

Re: How to unencode a string

2009-08-27 Thread Piet van Oostrum
> jakecjacobson (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

Re: How to unencode a string

2009-08-27 Thread Stephen Fairchild
jakecjacobson wrote: > This seems like a real simple newbie question but how can a person > unencode a string? In Perl I use something like: "$part=~ s/\%([A-Fa- > f0-9]{2})/pack('C', hex($1))/seg;" > > If I have a string like Word1%20Word2%20Word3 I want to get Word1 > Word2 Word3. Would also

Re: How to unencode a string

2009-08-27 Thread MRAB
jakecjacobson wrote: This seems like a real simple newbie question but how can a person unencode a string? In Perl I use something like: "$part=~ s/\%([A-Fa- f0-9]{2})/pack('C', hex($1))/seg;" If I have a string like Word1%20Word2%20Word3 I want to get Word1 Word2 Word3. Would also like to han

Re: How to unencode a string

2009-08-27 Thread Chris Rebert
On Thu, Aug 27, 2009 at 2:10 PM, jakecjacobson wrote: > This seems like a real simple newbie question but how can a person > unencode a string?  In Perl I use something like: "$part=~ s/\%([A-Fa- > f0-9]{2})/pack('C', hex($1))/seg;" > > If I have a string like Word1%20Word2%20Word3 I want to get Wo

How to unencode a string

2009-08-27 Thread jakecjacobson
This seems like a real simple newbie question but how can a person unencode a string? In Perl I use something like: "$part=~ s/\%([A-Fa- f0-9]{2})/pack('C', hex($1))/seg;" If I have a string like Word1%20Word2%20Word3 I want to get Word1 Word2 Word3. Would also like to handle special characters