Forum
Weird characters but UTF-8 set?
Hi there
Seem to be having a few issues with weird characters, e.g. https://lovebedford.co.uk/business/what-we-do-for-you.php
"Café Seating BedfordBID saves cafes over £3,000 per year, after driving down the café seating charge from £3,800 to under £500. Café society".
However, this is only appearing on certain pages, and I have <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> in the header so it should prevent that right?
Could something have happened on the server or am I missing something obvious?
Thanks
Rich
Even stranger - this seems to have also effected old news stories, e.g. https://lovebedford.co.uk/news/post.php?s=2014-05-23-hair-and-beauty-show-a-student-sensation
but new ones are fine... https://lovebedford.co.uk/news/post.php?s=2016-05-26-love-bedford-run-bedford-2016
OK, so I logged into Perch admin and went on the top link page and just clicked 'Save' and now it seems to not have any funny characters. However, I don't really want to go into every news story and have to click Save as it will be quite time consuming!
It seems to affect pages that are older than November 2015 as seen by the news listings:
https://lovebedford.co.uk/news/?page=6
Can you show me your diagnostic report?
Thanks Drew. I know I'm in the wrong for using /news instead of /blog and it's a really old version of Perch. I do plan on starting from scratch with this site on a new server but wondered if there was a quick fix I could do.
I contacted my host and they said the following:
Have you at some point exported and reimported the database? If that was done without respect to the encoding, it could have screwed it up.
Additionally, your pages aren't being served wit a UTF8 header. If you were on a current version of Perch we'd be doing this for you, but you can force it yourself:
Be sure to do that before any HTML is output.
Hi Drew
No I've never exported/imported the db.
Thanks for the above code, I've added it to the headers but doesn't seem to have changed anything.
It is weird how it's only affecting certain news stories and only in the title not the body of the story.
I'm just going to go in the news stories and re-save them manually but I'll leave this thread up here as someone else may come across it in the future.
Thanks