0

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 from 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?

1 Answer 1

0

Maybe we should try to use UTF-8 charset?

Sign up to request clarification or add additional context in comments.

2 Comments

Tried changing that on the HTM doc. I think the problem is that something happens when the doc is run through jQuery, so changing both documents to utf-8 didn't work for me.
your page alltomven.se/09-0005-05.htm returns "Content-Type: text/html" in header. Therefore, xhr believes that response is utf-8 charset. Solutions 2 way: first, you convert page in utf-8, second, you return "Content-Type: text/html; charset=windows-1252" in header.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.