Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Thanked 0 Times in 0 Posts

    Translation of cookie data

    I set a cookie called UserID. The data portion contains this format:


    I set the UserID in the client code using Javascript. When I process the cookie in the xerver code using Visual Basic the backslash (\) translates to %5C. Who is doing this translation and how I can set the \ so that it will be read in the server program as backslash.

    Thank you

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 Posts
    *HOW* are you reading the cookie in VB??

    If you are doing it as Request.Cookie("name") then you shouldn't be seeing that.

    If you are trying to read the raw cookie data, then that is correct.

    Cookies are encoded the same way Query Strings and Post data are. In ASP/VBScript code, you can explicitly unencode them using the VBScript function UnEscape but I don't know if VB has that function available.

    Best would be to stop trying to read raw cookie data and allow the ASP Request object to do the decoding for you, if that's an available option for you.
    Be yourself. No one else is as qualified.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts