Visitantes

Powered By Blogger

Pesquisar neste Blog

terça-feira, 18 de abril de 2017

HTML com UTF-8-pt-br (CGI-Bin)



Um servidor com o Microsoft Windows Server e o IIS (Internet Information Services) instalado, nele vem como padrão de instalação reconhecer o texto do HTML no idioma inglês. 

Recentemente, tive problemas de meu código HTML parar de reconhecer os acentos utilizados do idioma português-brasileiro.  Tentei de tudo, e nada fazia os acentos voltar a funcionar. Pesquisei em dois livros velhos de HTML da década de 80, e lá tinha um capitulo falando de CGI, então eu resolvi fazer um arquivo CGI para testar, e funcionou, a acentuação das palavras voltaram a funcionar perfeito novamente no HTML.

Caso algum de vocês passem pelo mesmo problema que eu, podem testar esta solução.






Esse arquivo paginacao.cgi tem que ser feito o upload para dentro do servidor web.

Criei um arquivo CGI-Bin chamado paginacao.cgi com o seguinte conteúdo abaixo, ele funcionou perfeito:

#!/bin/sh
Content-type: text/html
Language: pt-br
Charset: UTF-8-pt-br

========================================================================

Translation:

A server that has Microsoft Windows Server and Internet Information Services (IIS) installed, it is by default that the installation recognizes English-language HTML text.

I recently had problems with my HTML code failing to recognize the accents used in the Portuguese-Brazilian language. I tried everything, and nothing made the accents work again. I researched two old HTML books from the 80's, and there was a chapter talking about CGI, so I decided to make a CGI file to test, and it worked, the accentuation of the words came back perfect working again in HTML.

If any of you go through the same problem as me, you can test this solution.
This paginacao.cgi file has to be uploaded to the web server.

I created a CGI-Bin file called paginacao.cgi with the following content below, it worked perfect:

#! / Bin / sh
Content-type: text / html
Language: pt-br
Charset: UTF-8-pt-br

========================================================================

IIS configuration for UTF-8-pt-br (CGI-Bin) 

https://social.technet.microsoft.com/wiki/pt-br/contents/articles/37754.iis-configuration-for-utf-8-pt-br-cgi-bin.aspx

========================================================================

Por Ana Mercedes Gauna (18/04/2017)
Senior Business Systems Analyst
Twitter: @amgauna @AnaGaunaTech
WebSite: http://www.amgauna.eti.br
Blog: http://anagaunatech.blogspot.com
Blog: anagauna.wordpress.com

Nenhum comentário: