Th3Alchemist Posted April 25, 2012 at 10:58 AM Report #451323 Posted April 25, 2012 at 10:58 AM Boas pesssoal! Antes de mais: Já pesquisei sobre problemas de encoding e dos resultados encontrados, nenhum me ajudou... Tenho o seguinte código: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> (...) E os ficheiros estão a ser gravados como encoding UTF-8 no NetBeans Funciona tudo bem, mas quando meto o site no alojamento, os caracteres ficam com erros, e no W3C Validator dá me o seguinte erro: Character Encoding mismatch!The character encoding specified in the HTTP header (iso-8859-1) is different from the value in the <meta> element (utf-8). I will use the value from the HTTP header (iso-8859-1) for this validation. Line 5, Column 30: Internal encoding declaration utf-8 disagrees with the actual encoding of the document (windows-1252). <meta charset="UTF-8"> E isto não me entra na cabeça o que corrigir... Já o W3C Validator detecta o encoding automaticamente como iso-8859-1 :S
Th3Alchemist Posted April 25, 2012 at 11:04 AM Author Report #451325 Posted April 25, 2012 at 11:04 AM Problema resolvido mas duvido acerca da solução se é a mais correcta: Adicionei este script PHP: <?php header('Content-type: text/html; charset=utf-8'); ?>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now