Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Does SS3 encode Content-Type differently to SS2.x?

Go to End

2 Posts   1384 Views


Community Member, 607 Posts

8 April 2014 at 9:42pm

So I've run an upgrade on a 2.4 site and all is kind-of well after migrating the usual deprecated classes and template constructs. Other than these changes, nothing in my classes or templates has changed.

What I have found on doing the upgrade on two different environments is that some weird encoding is making it's way into some of my page content. Live example is here: See the  and – characters in the main body.

Admittedly, these characters are in the database too. But the thing is, they are also in the SS2.4 database too, and that somehow gets away with it.

Database encoding looks identical. Doctype and meta looks identical. When I compare sources in Winmerge, only the content really stands out as being different.

Could this be something new in SS3 at work that I need to cater for? Anyone encountered the same? I've made a quick function to clean on the fly, but would rather they overhead if there are other ideas.



Community Member, 607 Posts

22 April 2014 at 8:55pm

I have since discovered that this is occurring on most content after the upgrade.

After checking the database collations against the 2.4 copy of the site, I can safely say the only difference here is the Silverstripe version. The 2.4 version even has content with these encoded characters in them, yet they are not displayed on render.

Has no one else seen this? Days of hunting general encoding issues has revealed nothing.