Character encoding issue in upgrade to version 2

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Character encoding issue in upgrade to version 2

Post by Andrew Prior »

I have upgraded my second web site to Version 2 (Freetown) and have hit the wall.

Both sites use the same basic template.
Both sites are on identically (I am told) configured servers belonging to the same web host company.

But the second site has multiple encoding issues: for example, the hyphens in this comment in my templates:

Code: Select all

<!-- Primary Page Layout
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
are displayed as this:

Code: Select all

–––––––––––––––––––––––––––––––––––––––––––––––––â€
This stops anything below there being displayed.

I can remove the comment from the template, and then run into other similar character encoding problems. And the pages display as though some style sheets are not attached, although I have verified that they are in place.

These line is in my global settings:

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Particularly annoying is the fact that the site is working perfectly on another test server apart from a few old hard coded links which I expect not to work. Exported to my live server, it all turns to excrement.

Placing
$config['default_encoding'] = '';
$config['admin_encoding'] = 'utf-8';
$config['set_names'] = false;
in the config.php removes some of the errors, but doesn't touch the string of hyphens noted above.

I realise I have given quite sketchy details here, but wonder if anyone can suggest directions I might investigate.
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

Re: Character encoding issue in upgrade to version 2

Post by PinkElephant »

I'm no expert but a couple of things spring to mind:
  1. Are all tables in all databases using the same collation (such as utf8_general_ci)?
  2. When you inspect the http response, is the Content-Type header set as you'd expect - text/html; charset=utf-8 ?
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Re: Character encoding issue in upgrade to version 2

Post by Andrew Prior »

Well, I'm certainly no expert...

I noticed I had left the old menu manager in place... so I deleted it, which meant that breadcrumbs don't work... so checked that out and found the new code is nav_breadcrumbs... put it in... and voila!!!!

every template I have changed so far works perfectly. No encoding problems, style sheet suddenly works...

I have no no no no idea what that's about!!

I guess I'll work through the rest of the templates (it's a huge site) and we'll see if it keeps working!
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

Re: Character encoding issue in upgrade to version 2

Post by PinkElephant »

Göõd luck ;)
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

[SOLVED] Re: Character encoding issue in upgrade to version

Post by Andrew Prior »

Ta! I'm wondering if, despite my clearing the cache multiple times after my migration from the test server, something has just finally, cleared. A couple of pages which were not working before and now do, don't have breadcrumbs anyway, so it's not just the absence of the menu manager.
¯\_(ツ)_/¯
Post Reply

Return to “The Lounge”