%C3%83%C2%A9
That's encoded too much: the string is written as UTF-8, read back in as ISO-8859-1, then written as UTF-8 again before being hex-encoded!
%E9
That's encoded too little: the string is written out as plain ISO-8859-1 and hex-encoded. This is fine if the PHP script you are talking to is expecting ISO-8859-1, but modern web systems should be talking UTF-8, in which case the sequence you want it to look like:
%C3%A9
(That's encoded just right!)
I am using Server.URLEncode in classic ASP
Classic ASP has, unfortunately, some serious deficiencies in processing Unicode. You can set @ CODEPAGE=65001 (and Response.Charset="UTF-8") to produce UTF-8 pages, but your internal string type is still encoded in the system codepage, and any data grabbed from form submissions or the database will be read into that encoding.
So you can URLEncode() a literal chr 233 to get the correct output OK, but if you're getting the data from a UTF-8-encoded ‘é’ in a form submission, you'll end up with ‘é’ — the UTF-8 sequence misinterpreted as ISO-8859-1 (actually cp1252, the Windows equivalent).
Best Answer
I have a Javascript implementation of DES/TripleDES. It does CBC and ECB modes, and for padding supports PKCS7, Spaces, or Zeroes. It's integrated with a RFC2898-compliant PBKDF2, so it can generate encryption keys and IV's from passwords if you like. You can also set the crypto key and IV explicitly.
It is usable when calling directly from Javascript - any browser, or from Rhino, or WScript.exe, or maybe closer to your case, classic ASP using Javascript.
I've also packaged it as a COM component, so it is possible to call it from any COM-compliant environment, like VBScript running in classic ASP, or Perl, or VBA, etc.
It is an independent implementation, and is fully compliant with and interoperable with the .NET DESCryptoServiceProvider and TripleDESCryptoServiceProvider.
Get it here: http://cheeso.members.winisp.net/srcview.aspx?dir=DES
When calling it directly from Javascript, it looks like this:
When calling the COM component from VBScript, it looks like this:
The encryption is pretty fast but the key generation is not.
Edit:
you can also use the Javascript DES stuff in a browser.
here's an example: http://jsbin.com/oguye3