NonMais Posted March 17, 2015 Share Posted March 17, 2015 Bonjour, on met ceci en entête de la page HTML: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> mais on a des soucis à l'affichage (et si on fait clic droit, encodage->UTF-8 : plus de soucis) => notre meta n'est pas correct? (le but étant que le browser sache bien qu'il faut qu'il décode UTF- Merci de votre aide. Link to comment Share on other sites More sharing options...
Cara62 Posted March 17, 2015 Share Posted March 17, 2015 tu mets bien dans : <html> <head> <meta charset="utf-8" lang="fr"> (j'utilise simplement ça pour définir l'encodage) ..... </head> ..... </html> Edit : Quel navigateur et version ? Link to comment Share on other sites More sharing options...
dudul88 Posted March 17, 2015 Share Posted March 17, 2015 Heu... c'est pas le slash que t'oublies ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> Je dis ça, j'y connais rien, mais mon CMS génère les pages comme ça... Link to comment Share on other sites More sharing options...
Cara62 Posted March 17, 2015 Share Posted March 17, 2015 Heu... c'est pas le slash que t'oublies ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> Je dis ça, j'y connais rien, mais mon CMS génère les pages comme ça... En HTML 5 pas besoin. C'est la balise que j'utilise et c'est largement plus simple. Link to comment Share on other sites More sharing options...
dudul88 Posted March 17, 2015 Share Posted March 17, 2015 OK, OK... Comme je disais, j'y connais rien ^^ Mais chez moi ça marche très bien comme ça... Et du coup je comprends pas pourquoi tu mets lang="fr". Link to comment Share on other sites More sharing options...
Cara62 Posted March 17, 2015 Share Posted March 17, 2015 OK, OK... Comme je disais, j'y connais rien ^^ Mais chez moi ça marche très bien comme ça... Et du coup je comprends pas pourquoi tu mets lang="fr". ça c'est pour un Framework, il y en a pas besoin normalement, juste le charset suffit. Link to comment Share on other sites More sharing options...
Sheepux Posted March 17, 2015 Share Posted March 17, 2015 Ton serveur a peut être répondu au niveau HTTP que l'encodage de la page est en ISO-8859 (ou autre). La norme HTTP spécifie que le header http (content-type) est prioritaire au contenu (balise meta) http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2 To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest): An HTTP "charset" parameter in a "Content-Type" field. A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset". The charset attribute set on an element that designates an external resource. Il te faudra changer le header http (dans php si c'est du php, via htaccess sur un apache si le contenu est statique). Amuse toi bien Sheep Link to comment Share on other sites More sharing options...
NonMais Posted March 17, 2015 Author Share Posted March 17, 2015 Bon, en fait, c'est qu'il faut mettre UTF-8 en majuscules je mets résolu. Link to comment Share on other sites More sharing options...
Sheepux Posted March 17, 2015 Share Posted March 17, 2015 Navigateur pas à la norme alors car c'est normallement insensible à la casse :) http://www.w3.org/TR/html-markup/meta.charset.html A case-insensitive match for any character set name for which the IANA [Character Sets] registry has a Name or Alias field labeled as “preferred MIME name”; or, if none of the Alias fields are so labeled, a case-insensitive match for a Name field in the registry. Link to comment Share on other sites More sharing options...
RinDman Posted March 17, 2015 Share Posted March 17, 2015 Ou bien ton éditeur de code n'enregistre pas les fichiers en UTF8 également Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.