Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A question about encode/decode in perl

Status
Not open for further replies.

lcs01

Programmer
Joined
Aug 2, 2006
Messages
182
Location
US
A user input from a web form is encoded by javascript encodeURI and it's then passed into a perl code. How to decode it in perl?

Thank you for your help.
 
If you use the CGI module to get the user data there should be nothing you have to do.

use CGI qw/:standard/;
my $foo = param('foo');



------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thank you, Kevin.

I am using CGI.pm. The problem I have is like this:

A user input is 'faßt' and after it is encoded by javascript encodeURI(), it becomes like this: 'fa%C3%9Ft'. When 'fa%C3%9Ft' is passed into a perl code, how can I convert it back to 'faßt'?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top