In that case, you would need the script that generates the JavaScript to know the encoding. You could get that via a HTTP request, but the information you get in the header (if any) is often wrong, because the server itself typically doesn't know what the encoding is. So you could fetch the page, any parse it for a charset information in the HTML header. Not efficient and error-prune, but I can't think of anything else.
Sam
|