Error iframe html characters

2019-01-29 11:02发布

问题:

excuse my English I speak Spanish

I'm trying to display multiple php and mysql registration, after that the show in an iframe

the problem is that apparently in the iframe shows me errors accents and other characters for example: for example (�D�nde cuesta menos y se consume m�s?")

this is what shows (�)

In the original query or first does not show me that, but in the iframe shows me that error

What should I do?

regards

回答1:

"When a browser renders/parses a web document that does not have the character encoding declared it will guess at what character set to use and may choose the wrong one therefore rendering the web page incorrectly."

Does the page in the iframe declare its encoding in its HTML?



回答2:

Español:
Hey que tal yo también hablo el español y también tenía este problema, la solución que encontre fue poner <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> en el <head>, pero si lo prefieres (no creo) puedes cambiar todos los acentos por &(vocal)acute; ejemplo: &aacute (acento a la á). Espero que te haya servido.

Puedes encontrar todos los carácteres especiales aquí.

English:
Hey the solution that I found was write <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in <head>, but if you prefer (I don't think so) you can change all the accents with &(vocal)acute; like &aacute (á). I hope it helps.

You can find all the special HTML characters here.