|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ftrouve@scroon.com Smarty n00b
Joined: 27 Oct 2011 Posts: 2
|
Posted: Thu Oct 27, 2011 9:12 am Post subject: Problème d'affichage de date avec date_format |
|
|
Bonjour,
Lorsque j'essaye d'afficher une mois avec date_format:"%b" dans mon fichier tpl, le mois d'août (par exemple) s'affiche comme ceci : ao�
Voici ma ligne de code :
{$date.periodStart|date_format:"%b"}
En anglais tout passe niquel car il n'y a pas d'accents
Avez-vous une idée ?
Merci d'avance. |
|
Back to top |
|
Gowser Smarty Pro
Joined: 19 Feb 2008 Posts: 104 Location: Nantes (France)
|
Posted: Tue Nov 15, 2011 12:50 pm Post subject: |
|
|
Bonjour,
C'est un probleme de content-type de ta page.
Ajout la balise meta dans le head de ta page pour controler le content type _________________ N'oubliez pas de mettre le tag "[Résolu]" sur vos post |
|
Back to top |
|
ftrouve@scroon.com Smarty n00b
Joined: 27 Oct 2011 Posts: 2
|
Posted: Thu Dec 08, 2011 5:19 pm Post subject: |
|
|
Bonjour Gowser,
La balise meta est présente dans le code :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
Back to top |
|
gnusti Smarty n00b
Joined: 16 Jul 2013 Posts: 1
|
Posted: Tue Jul 16, 2013 12:16 pm Post subject: |
|
|
Bonjour,
Je déterre un peu le topic mais je rencontre le même problème avec l'affichage du mois d'Août... Une solution a-t-elle été trouvée depuis ? |
|
Back to top |
|
bluejester Smarty Regular
Joined: 26 Apr 2012 Posts: 55
|
Posted: Fri Sep 13, 2013 9:57 am Post subject: |
|
|
Il vaut mieux contrôler le content-type directement depuis php :
Code: | header('Content-Type: text/html; charset=utf-8'); |
ou
Code: | header('Content-Type: text/html; charset=ISO-8859-1'); |
si tu es en ISO.
Il faut que le charset spécifié dans la balise meta soit le même. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|