Converting %## back to special characters from an HTML form


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Converting %## back to special characters from an HTML form
# 1  
Old 01-14-2006
Converting %## back to special characters from an HTML form

I have an HTML form that sends email to a large list of users one at a time by matching an email address in peoplesoft to their username. It works great, except that special characters are converted to %## format. Is there a library of these I can use to sed them back (yes this is a crappy UNIX shell cgi, bash) to the correct character, or a simple perl script that will do it?
# 2  
Old 01-14-2006
For Perl,

Code:
$str =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;

will convert all URL-encoded entities in $str back to the corresponding character.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pass argument to html upload form

I am using an html form and a php upload script to upload files. HTML form <table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <td> <table... (1 Reply)
Discussion started by: anil510
1 Replies

2. Shell Programming and Scripting

MySQL bulk retrieval of database through html form

Have to delete this long post. Seems nobody would spent time on it. (0 Replies)
Discussion started by: yifangt
0 Replies

3. Shell Programming and Scripting

Converting form field to table format

May data Name = Andi Address = none Phone = 82728 Name = Peter Address = none Phone = 98799 The expected output Name,Address,Phone Andi,none,82728 Peter,none,98799 what i have done (6 Replies)
Discussion started by: before4
6 Replies

4. Shell Programming and Scripting

Replace special characters with Escape characters?

i need to replace the any special characters with escape characters like below. test!=123-> test\!\=123 !@#$%^&*()-= to be replaced by \!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies

5. Solaris

man pages in html form

Hi I would like to convert standard online man pages from my solaris10 system into html form to publish it on my webpage. How this can be done in Sol10 ? thx for help. (2 Replies)
Discussion started by: presul
2 Replies

6. Shell Programming and Scripting

Pass variable to php from html form

I am sure this is easy but I can't figure it out... Here is the form. <?php $searchString = $_POST; if (!isset($_POST)) ?> <html> <head> <title>Personal INFO</title> </head> <body> <form method="post" action="search.php"> <input type="text" size="20" maxlength="20" name="search">... (1 Reply)
Discussion started by: mrlayance
1 Replies

7. UNIX for Dummies Questions & Answers

Converting csv to tsv and back

Anyone have a simple UNIX script to look at for doing this? I'm interested in how to convert from csv to tsv, and then back again, if I want to. Thanks! (13 Replies)
Discussion started by: doubleminus
13 Replies

8. Programming

Reading special characters while converting sequential file to line sequential

We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies

9. Shell Programming and Scripting

HTML form to cgi help

I wrote a script to automate user account verification against peoplesoft. Now I want to make it available to my peers via the web. It is running on Solaris. I have the form written, but am not sure how to make it work. I think the form should call a perl cgi when submitted. The cgi should call... (7 Replies)
Discussion started by: 98_1LE
7 Replies

10. Shell Programming and Scripting

Passing FORM(HTML) variable to ksh

I am currently able to use the $QUERY_STRING variable and simply cut out what I need to be assigned as variables within the shell script. However, I've been able to use the "name" value assigned within the FORM(HTML) as a variable when I use perl. Why is it that ksh doesn't read the "name" in as... (1 Reply)
Discussion started by: douknownam
1 Replies
Login or Register to Ask a Question