I'm working on a site where the user can switch between English and French. To output the date of posts.
If the user chooses French I use:
setlocale(LC_ALL, 'fra_fra');
Then to output the date I use:
strftime('%d %B %Y', strtotime($post->post_date));
I have my charset at utf-8 with:
<meta charset="utf-8">
The problem I have is characters like ? and others with accents just display as the black diamonds with question marks in.
Is there a way to fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…