I’ve just spent a few very frustrating and completely unproductive hours trying to understand why the Ajax requests that worked in almost all browsers refused to work in all versions of IE (tested from 6 to 8) with some vague error which IE itself refused to debug properly:
- The error said “System error: -1072896658″
- Even successful Ajax response from the server for some reason caused an error handler to be executed in the Javascript
Microsoft Script Debugger which you normally use for this kind of stuff in IE6 showed me absolutely nothing (a blank white screen to be precise). Thank god that IE8 got a built in very nice debugger now. At least it was able to show me a particular line in my Javascript code. Better then nothing although the line itself didn’t explain anything.
Thanks to my natural powerful investigation skills I was able to finally narrow down the problem to the HTTP header with the charset that was sent back to the browser by the server (ie. my code on the server). I’ve used “utf8″ to specify the Unicode charset, which still looks perfectly ok to me. But since this place started to look suspicious, I looked at how other sites specify the same thing in the same HTTP header and damn — they all used “utf-8″ (with a mother effing dash!).
After I’ve changed the charset in my code to “utf-8″, all versions of IE stopped complaining. What a bizarre, bizarre thing! And even the latest and greatest from Microsoft – IE8 was also prone to this nonsense. Unbelievable.
Tags: IE, Software Development, Unicode

