Are the accents on my page missing?

Asked

Viewed 24,888 times

7

I created a page html, however the accents are not being read, already tested the following code but does not work.

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

What can I do then?

3 answers

6

It all depends on how the characters are being saved and loaded If instead of Heart, he displays Cora the or Coraã§. In the first case Cora the, your page in ISO-8859-1 is getting the word Heart stored in UTF-8 from the source, be it from the database or an XML, txt etc. Already the second case (Coraã§) is your page in UTF-8 displaying the word Heart stored in ISO-8859-1 of origin.

You can put the encoding inside the meta like this:

For ISO-8859-1:

<html>
<head>
<title>Minha pagina</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

To UTF-8:

<html>
<head>
<title>Minha pagina</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

And you can also put html encoding for the accents, follow the list:

Tabela com os caracteres mais utilizados
A maiúsculo com acento agudo    Á   &Aacute;
E maiúsculo com acento agudo    É   &Eacute;
I maiúsculo com acento agudo    Í   &Iacute;
O maiúsculo com acento agudo    Ó   &Oacute;
U maiúsculo com acento agudo    Ú   &Uacute;
A minúsculo com acento agudo    á   &aacute;
E minúsculo com acento agudo    é   &eacute;
I minúsculo com acento agudo    í   &iacute;
O minúsculo com acento agudo    ó   &oacute;
U minúsculo com acento agudo    ú   &uacute;
A maiúsculo com acento circunflexo  Â   &Acirc;
E maiúsculo com acento circunflexo  Ê   &Ecirc;
O maiúsculo com acento circunflexo  Ô   &Ocirc;
A minúsculo com acento circunflexo  â   &acirc;
E minúsculo com acento circunflexo  ê   &ecirc;
O minúsculo com acento circunflexo  ô   &ocirc;
A maiúsculo com crase   À   &Agrave;
A minúsculo com crase   à   &agrave;
U maiúsculo com trema   Ü   &Uuml;
U minúsculo com trema   ü   &uuml;
C cedilha maiúsculo Ç   &Ccedil;
C cedilha minúsculo ç   &ccedil;
A com til maiúsculo à   &Atilde;
O com til maiúsculo Õ   &Otilde;
A com til minúsculo ã   &atilde;
O com til minúsculo õ   &otilde;
N com til maiúsculo Ñ   &Ntilde;
N com til minúsculo ñ   &ntilde;
E comercial &   &amp;
Aspa dupla  "   &quot;
Aspa simples    '   &#039;
Menor que   <   &lt;
Maior que   >   &gt;

1

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
    </head>
    <body>
        <h1>ÁÀÃÂ</h1>
    <body>
</html>

Upshot:

ÀÂ

0

Maybe you’re using HTML 5 without knowing, that’s the difference between the two:

<!-- HTML 4 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- HTML5 -->
<meta charset="utf-8"/>

Try with HTML 5 shape.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.