EricThePanic Posted December 1, 2011 Report Share Posted December 1, 2011 Hello all, I'm having problems with some of the characters on my website. My site is in french, so I need accents like è, é, à , etc... As you can see on my frontpage (http://www.transquebec.org/operations/) the accents are not displaying correctly, but only in some places like the news of the menu bar... it shows a square instead. My DB is in UTF-8, my local.config also... I've tried everything... Thanks for your help! Eric Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 1, 2011 Administrators Report Share Posted December 1, 2011 Add this in the head portion of your page. <meta http-equiv="content-type" content="text/html;charset=utf-8" /> Quote Link to comment Share on other sites More sharing options...
EricThePanic Posted December 1, 2011 Author Report Share Posted December 1, 2011 That's already done... but those characters still won't appear... Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 1, 2011 Administrators Report Share Posted December 1, 2011 I just looked at the source for your page and the code is not there in the head; currently it is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <meta http-equiv="X-UA-Compatible" content="IE=7"> try changing it to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> Quote Link to comment Share on other sites More sharing options...
EricThePanic Posted December 2, 2011 Author Report Share Posted December 2, 2011 lol Where can I make that change? The change I made was in local.config but hehe I don't know what file to modify to change that line! Oops, i'm not a programming chief loll Thanks a lot Quote Link to comment Share on other sites More sharing options...
Jeff Posted December 2, 2011 Report Share Posted December 2, 2011 Usually in the layout.tpl Quote Link to comment Share on other sites More sharing options...
EricThePanic Posted December 2, 2011 Author Report Share Posted December 2, 2011 Ok thanks, it's done! But still the same problem... Quote Link to comment Share on other sites More sharing options...
EricThePanic Posted December 2, 2011 Author Report Share Posted December 2, 2011 Custom pages are showing characters correctly, the problems are only with the text contained in .tpl files and in database... Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted December 3, 2011 Moderators Report Share Posted December 3, 2011 This is what i use. In the header or layout tpl depending on your site put this, <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> And in the local.config.php make sure this is in there, # Page encoding options Config::Set('PAGE_ENCODING', 'UTF-8'); Config::Set('DB_CHARSET_NAME', 'utf8'); Quote Link to comment Share on other sites More sharing options...
EricThePanic Posted December 5, 2011 Author Report Share Posted December 5, 2011 I finally solved my problem by encoding my templates in "UTF-8-No Marks" instead of "UTF-8"... But the problem remains at one place... In the news list on the frontpage! When I look in my DB, the news still encode in ISO. lol Why? It's the only place... Any idea? Thanks! Quote Link to comment Share on other sites More sharing options...
EricThePanic Posted December 5, 2011 Author Report Share Posted December 5, 2011 Solved! I changed the last line of my news_newsitem.tpl from: <p><?php echo html_entity_decode($body);?></p> To: <p><?php echo ($body);?></p> Thanks for your help guys! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.