[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Convert a Perl CGI code to ASP

Posted on 2004-10-22
6
Medium Priority
?
200 Views
Last Modified: 2013-12-25
I need to convert a Perl CGI script to ASP vb script, becuase I require to convert the data into my ASP program. and I have no idea about the CGI.

This is the CGI script

sub dc_decode {
    my $todecode = shift;
    return undef unless defined($todecode);
    $todecode =~ tr/+/ /;       # pluses become spaces
    $todecode =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
    $todecode =~ s/\r\n/\n/g;;
    return $todecode;
}

Do anyone know the ASP version of the above script?
0
Comment
Question by:billson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
StormyWaters earned 2000 total points
ID: 12389051
0
 
LVL 13

Expert Comment

by:StormyWaters
ID: 12389261
Oh, I actually said this in the ASP version of this question as well, because I thought it hadn't gone through.
0
 
LVL 1

Author Comment

by:billson
ID: 12392065
thx StormyWaters, the return code is correctly display in ASP page, but if I use Windows Script Hosting - vbs file to get the output. the return code is mess-up. Any idea?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 13

Expert Comment

by:StormyWaters
ID: 12394620
Not quite sure, I don't use VB too often. What output do you get?
0
 
LVL 1

Author Comment

by:billson
ID: 12397294
If I input the Big5 Characters for input
e.g. "中文 & Test", it returns "?? & Text" in WSH. But in ASP, it returns correctly.
0
 
LVL 13

Expert Comment

by:StormyWaters
ID: 12405838
I'll look into it next time I'm in Windows. :)
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question