What is the asp funtion to decode a javascript escape function for a post operation?

Posted on 2007-10-01
Medium Priority
Last Modified: 2008-01-09
I have an encoded string being read into an classic asp page.  The information was sent on a form via post.  It was encoded in javascript using the built in function escape.

What is the asp function to decode the javascript escape function?
I will be decoding many charactetrs, but in particular I  am decoding a unicode character (u2013) the emdash character.   This is not the ascii a character in the ascii character set.
Question by:swansonplace
LVL 58

Assisted Solution

Gary earned 400 total points
ID: 19993561

Accepted Solution

deathtospam earned 1600 total points
ID: 19993671
In ASP, you can use one of two languages on the server: VBScript (the default) or Javascript.  And while there's no way to decode a string encoded by client-side Javascript's escape() function, you CAN do this with server-side Javascript:

<script language="javascript" runat="server">
   yourString = unescape(thestring);

-= DeathToSpam =-

Author Comment

ID: 19993748
That should do it since I am encoding using escape.  I was using an asp decode function, but it did not decode the whole set that the escape funtion was using.  It was just doing the ascii character set.

Thank you.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

807 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