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

Posted on 2007-10-01
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

    LVL 9

    Accepted Solution

    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

    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

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    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…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now