Highlighted if illegible on page

4

My page (Header of a table and a modal popup), in accented letters or characters of the Portuguese language, are coming illegibly. In the head of the page I have this statement:

<head>
<title><%=Application("app")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<script type="text/javascript" src="../../gen/modal/jquery-ui.min.js"></script>
<script type="text/javascript" src="../../gen/modal/modal.crossbrowser.min.js"></script>

<link rel="stylesheet" type="text/css" href="\gen\css\css002.css">

<link rel="stylesheet" type="text/css" href="\gen\css\css007.css"> <!--cadeia de pagamento -->
<script type="text/javascript" src="\gen\js\tabelafixa.js"></script><!--cadeia de pagamento -->

<script src="../../gen/js/cpaint2.inc.compressed.js" type="text/javascript"></script>

<script type="text/javascript" src="\atb\asp\atb0037.js?<%=now()%>"></script>
<script type="text/javascript" src="\atc\asp\atc0006.js?<%=now()%>"></script>
<script type="text/javascript" src="\cal\asp\cal0087.js?<%=now()%>"></script>
<script type="text/javascript" src="\cal\asp\cal0088.js?<%=now()%>"></script>
<!--INICIO BARRA DE PROGRESSO-->
<script type="text/javascript" src="../../gen/js/waitbar.js"></script>
<link rel="stylesheet" type="text/css" href="\gen\css\progbar.css">
<!--FIM BARRA DE PROGRESSO-->
</head>

In the meta tag I also did this and did not solve:

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

I've already passed UTF to utf and still nothing. I have a popup calling page and in it I have the includes and the meta for characters. The grid (table) is on the same page as the popup. see the grid image as it is.

    
asked by anonymous 24.08.2015 / 20:56

4 answers

4

According to this response the charset sent by the HTTP header Content-type takes precedence over charset informed by meta-tag, possibly so change meta tag has not resolved, check response headers if charset information exists.

Complementing with an example the charset errors ():

  

"Song" stored in UTF-8 and displayed as ISO-8859-1: Song

     

"Song" stored in ISO-8859-1 and displayed as UTF-8: Song

    
24.08.2015 / 21:19
3

I made a test using the header that you passed and the body only with "Test". With UTF-8 ran and with ISO-8859-1 failed. Put in a test.html file only the following:

<html>
<header>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</header>
<body>
      Teste çãáâõ
<script src="teste.js"></script>
</body>
</html>

and you'll see that it works. At least it worked for me in Firefox. So it must be something other than the meta tag. Try to remove all the lines of scripts, test and go putting them one by one. I think it is very possible that the response from Sançao has relevance as well.

    
24.08.2015 / 21:20
1

just put the meta tag with the charset type utf-8

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

If it does not resolve then you will have to configure it in the http server configuration file (apache, toncat etc.) if you need help for these cases just comment below that I edit the answer

    
24.08.2015 / 21:35
1

Searching the internet I was able to find a table of codes that replace the accents, as follows:

á = \u00e1 à = \u00e0 â = \u00e2 ã = \u00e3 ä = \u00e4 Á = \u00c1 À = \u00c0 Â = \u00c2 Ã = \u00c3 Ä = \u00c4 é = \u00e9 è = \u00e8 ê = \u00ea ê = \u00ea É = \u00c9 È = \u00c8 Ê = \u00ca Ë = \u00cb í = \u00ed ì = \u00ec î = \u00ee ï = \u00ef Í = \u00cd Ì = \u00cc Î = \u00ce Ï = \u00cf ó = \u00f3 ò = \u00f2 ô = \u00f4 õ = \u00f5 ö = \u00f6 Ó = \u00d3 Ò = \u00d2 Ô = \u00d4 Õ = \u00d5 Ö = \u00d6 ú = \u00fa ù = \u00f9 û = \u00fb ü = \u00fc Ú = \u00da Ù = \u00d9 Û = \u00db ç = \u00e7 Ç = \u00c7 ñ = \u00f1 Ñ = \u00d1 & = \u0026 ' = \u0027

Example:

alert("O campo nome é de preechimento obrigatório ");

Replacing would stay:

alert("O campo nome \u00e9 de preenchimento obrigat\u00f3rio");
    
01.06.2018 / 17:56