Page 1 of 1

Character encoding issue in upgrade to version 2

Posted: Fri Jun 10, 2016 1:01 pm
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.

Re: Character encoding issue in upgrade to version 2

Posted: Fri Jun 10, 2016 2:00 pm
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 ?

Re: Character encoding issue in upgrade to version 2

Posted: Fri Jun 10, 2016 2:06 pm
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!

Re: Character encoding issue in upgrade to version 2

Posted: Fri Jun 10, 2016 2:13 pm
by PinkElephant
Göõd luck ;)

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

Posted: Fri Jun 10, 2016 2:18 pm
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.
¯\_(ツ)_/¯