I'm requesting some text file using IE7's XMLHTTPRequest. XMLHTTPRequest is interpreting the file as utf-8, but it's not in fact that, and it breaks because of that. The server doesn't return a charset directive, and I have no control
at all over the server.
An alternative method to download the file would also work. The script has local machine privileges so it can do more than a regular browser script.
The default charset for XHR is UTF-8 with BOM being used to differentiate other encodings when the server returns no charset, so you might try using setRequestHeader() on the XHR to see if sending Accept-Charset might change the server's mind.