views:

226

answers:

2

This is happening in one cookie with keys in one key only. The value should be "ÅÙÏ‘‹„‰Š„‹".

+2  A: 

The value should be "ÅÙÏ‘‹„‰Š„‹".

Erm, really? That looks like the corrupted, wrong-character set version to me! :-) Either way, “ϑ” is what you get when you save that string in Windows Western European encoding (cp1252) and then read it back in as UTF-8, removing all the ‘invalid character’ codes that result because it's not a valid UTF-8 string. So you've got a classic reading-and-writing-using-different-encodings problem.

As a general rule you can't get away with putting non-ASCII characters in a cookie (name or value) directly. You'll need an application-level encoding mechanism of some sort; one of the most popular ways is to URL-encode the UTF-8 representation of the characters you want, similarly to how JavaScript's encodeURIComponent does it.

(Unfortunately ASP classic has very poor support for handling Unicode.)

bobince
A: 

Final Solution: Save As different file with "correct" encoding Changed encoding

  • From "Unicode (UTF-8 with signature) -Codepage 65001"
  • To "Western European (Windows) - Codepage 1252"
pabben