Reputation: 4040
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.
Upvotes: 2
Views: 3609
Reputation: 11148
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).
Upvotes: 1
Reputation: 34169
Do you have the right charset?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Upvotes: 1
Reputation: 39773
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:
<head>
says so.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)
Upvotes: 7