开发者

JQuery .load() character encoding problem in IE

IE (i'm using 8) will not show any swedish characters in a document loaded through jquery .load(). The file is part of the former page the client wants untouched, so I can't go in and change the encoding. This is the code I used to embed a fragment fr开发者_Go百科om an HTM doc into the current one (The HTM document is in Windows-1252 and nothing else would work to fix it on Firefox):

$.ajaxSetup({contentType: 'text/html;charset=windows-1252'});

$.ajaxSetup({
        'beforeSend' : function(xhr) {
             xhr.overrideMimeType('text/html; charset=windows-1252');
        },
});

$("#best").load("http://alltomven.se/09-0005-05.htm #table2");

I even have a fix I used for Firefox in there, but this doesn't work for IE. None of the diacritical characters show. What do I do?


Maybe we should try to use UTF-8 charset?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜