Problem with displaying french character in IE
I have to display "sélection?" in one of page that is viewed via iframe. But this is getting rendered as "s�lection?"开发者_如何转开发. If I view it requesting the page then it is rendering properly. But if I view it in an iframe it gets changed. Same thing is happening in Firefox and Chrome.
Just write sélection
.
What's happening is that your browser is displaying the page in another encoding (eg ISO-8859-1 instead of UTF-8). There are multiple reasons why this can happen:
- The tag in your
<head>
says so. - The tag in the webservers response headers says so.
- The browser is setup to override the formatting on the page.
If it works on the page itself, but when the page is in an iframe, check the encoding of the page containing the iframe. It will probably differ. Look for this kind of tag:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
And make sure they are the same on both pages (hint: you should probably be using UTF-8)
Do you have the right charset?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Along with the meta tag <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
, I convert the document to UTF-8, you have all kind of software to convert it to you (dreamweaver, textedit, etc).
精彩评论