Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Problème d'affichage de date avec date_format

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
ftrouve@scroon.com
Smarty n00b


Joined: 27 Oct 2011
Posts: 2

PostPosted: Thu Oct 27, 2011 9:12 am    Post subject: Problème d'affichage de date avec date_format Reply with quote

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
View user's profile Send private message
Gowser
Smarty Pro


Joined: 19 Feb 2008
Posts: 104
Location: Nantes (France)

PostPosted: Tue Nov 15, 2011 12:50 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Send e-mail
ftrouve@scroon.com
Smarty n00b


Joined: 27 Oct 2011
Posts: 2

PostPosted: Thu Dec 08, 2011 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
gnusti
Smarty n00b


Joined: 16 Jul 2013
Posts: 1

PostPosted: Tue Jul 16, 2013 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
bluejester
Smarty Regular


Joined: 26 Apr 2012
Posts: 55

PostPosted: Fri Sep 13, 2013 9:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP