Issue with Cookies and Character Encoding, from ASP.NET to classic ASP

I'm having an issue with a classic ASP forum that I'm trying to convert to work beneath an ASP.NET website. I'm using .NET Membership for storing user accounts and logging users in. Upon logging in, I write a cookie that saves the username and encrypted password, straight out of the database, for use by the forum. (I'm utilizing the same mechanism the forum itself already used; just having .NET handle logins and writing the cookie, and disabling all parts of the forum that handled that, i.e. rewriting them to only check credentials against the values in the cookie).

With one user (my primary administrative user, as luck would of course have it), I can't make the forum authenticate.
I can interact just fine with the forum as other users. I've tested the code itself piece by piece, and finally narrowed it down to the one difference: the password's encrypted value for the one user contains + signs. (They all contain = signs at the end of the encrypted password, and those are not a problem apparently.)
• When I view the cookie, from a .NET or classic ASP page, the password is proper - contains the +s.
• When I write the value that the classic ASP pages grab from the cookie, the +s are missing. They are not square boxes, as I'd expect - just spaces.
• I copy that value and paste it in my text editor, and it sees them the same as other spaces.
• If I try changing the encoding in my text editor, the +s do not show up.
• The .NET pages were originally UTF-8; the classic ASP pages were originally Windows-1252.
• If I change the encoding of the classic ASP pages to UTF-8 (using <meta charset="">), no change in the cookie value - though there are changes in the rest of the text on the page.
• If I set Response.Charset="UTF-8", no change.
• I can see the +s in the database. That and the fact that .NET is writing them to the database makes me assume they're stored as UTF-8.
• Session.LCID=1033, if that matters or affects anything.

How can I get classic ASP to read the cookie values properly?
Request.Cookies doesn't do something to their values, does it?
I'm currently looking to see if there's a way I can forcibly, in code, say "grab this value as UTF-8!".

I hate messing with character encoding. It always seems like it's controlled from too many places, and no matter how much I try, if it doesn't just magically work out, I can never get it to. Even when I do, then that usually just means Internet ****ing Explorer messes up somehow. And I don't have anyone that I can just ask to look over it all and point out to me how each piece of the machinery handles the value along the way - SQL Server, Windows server, the ASP itself, and then the client browser. And this sort of problem always ends up sucking up tons of time on something I didn't need to be spending the time on, usually with only extreme workaround solutions (like, "don't use that forum").
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

universalgloveAuthor Commented:
Finally remembered to do one of the searches I was thinking of, and found this:

I'm assuming that means I should try UrlEncode on the cookie value from .NET (and of course the corresponding UrlDecode in ASP).
universalgloveAuthor Commented:
Not a character encoding issue. Just an ASP is dumb issue. (I'm sure they had their reasons and all ...)
And then, ASP was almost dumber yet - there is no URLDecode in ASP. But! They saved themselves, because Request.Cookies does automatically decode the content.
*Phew* again.
So, the solution: simply Server.UrlEncode the cookie content (the hashed password) in .NET when writing the cookie, and ASP will then happily decode and properly read what was put in there.
Thank freaking goodness.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.