Strange characters/markup showing on website from CMS Builder

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 23, 2008   (RSS)

By miechey - October 22, 2008

Hello

We have recently built a site with cms builder sitting behind it, however when inserting a £ into the body of one of the fields it is displaying as a weird simbol, I've tried using £ which works in some of the fields but not all. Also having extra spaces will cause the character to be added.

http://www.gundersenbucherrugman.com/nfp-vacancies/nfp-vacancies.php

Thanks

Re: [miechey] Strange characters/markup showing on website from CMS Builder

By Dave - October 22, 2008

Hi miechey, welcome to the CMS Builder forums! :)

Strange characters are usually a character set problem. CMS Builder uses UTF-8 internally. If you view that page in Firefox, and then select from the menu: View > Character Encoding, it shows the charset as ISO-8859-1

Try editing the view page and replacing these tags:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859" />

With this one:
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

Hope that helps! Let me know if that fixes it for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Strange characters/markup showing on website from CMS Builder

By miechey - October 23, 2008

Thanks for your response Dave.

Unfortunately we have tried that, I am not the developer and he has basically said the problem is this...

"We cannot pull the data from the database in UTF-8, putting the UTF-8 header is fine, but to change the encoding we issue a character set command to mysql, this usually changes it to whatever we specify, but in our case it wont change it from the default which is latin."

Could this be to do with the version of mysql or php? Are there any known bugs?

Changing the character set works fine locally and on our development server, the problem seems to occur when pulling through from database..

Re: [miechey] Strange characters/markup showing on website from CMS Builder

By Dave - October 23, 2008

Hi miechey,

Some web servers are hard coded to send a certain charset types and that overrides the meta tags. This server in particular is sending a HTTP response like this:
Content-Type: text/html; charset=iso-8859-1

You can use this site here to confirm this: http://www.serverheader.com/

Try changing the meta tags as suggested and adding this to the very top of the page (before anything else):

<?php header('Content-type: text/html; charset=utf-8'); ?>

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com