close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Weird things happening with special characters

Thread began 2/21/2017 2:48 pm by Mags | Last modified 2/24/2017 12:51 am by Ray Borduin | 701 views | 10 replies |

Mags

Weird things happening with special characters

I know about encoding and displaying special characters, but I have something really weird happening! I have one CMS which governs several related client sites and some of the content is shared across these sites. All the sites use the same template and all have the same page encoding. I'm currently building another site for the same client using the same template with a few minor CSS changes, but for some reason if I input a special character via the CMS, say "£" it displays as "£" on this new site, but "£" on any of the other sites. However, if I input the £ sign directly into the database, it displays correctly on the new site but displays as � on the other sites. Any idea what might be causing this?

Sign in to reply to this post

Ray BorduinWebAssist

Sounds like a mismatch between one or more of these 3 things:

1) The <meta> tag charset
2) The database table defined charset for the pcms_contents table value field
3) The Connection/PowerCMS.php charset

Those three can be in conflict and it will cause issues like this.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

I've double-checked everything and all charsets are fine - as I said, it's the same content from the same database on 8 different sites, all hosted on the same server, same page template, same page encoding but special characters don't display properly on just one of those sites. The top of all pages is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">

The pcms2_contents table default collation is utf8_bin and the ContentValue column is also utf8_bin.

There wasn't a charset declaration in the PowerCMSConnection.php file, however I added one as follows to see if it would make a difference but it hasn't:

mysql_set_charset('utf8',$PowerCMSConnection);

Sign in to reply to this post

Ray BorduinWebAssist

Odd. If you give me FTP access and steps to reproduce I can look into it further. I'd have to actively debug at this point.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

That would be great Ray, details in PM section.

Sign in to reply to this post

Ray BorduinWebAssist

I'm going to need FTP access to all 3 sites to debug this. The working site, the broken site, and the cms site.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Apologies, FTP details for CMS site are in the PM.

Sign in to reply to this post

Ray BorduinWebAssist

I added the charset definition to all three site connection files:

mysql_set_charset('utf8',$PowerCMSConnection);

That made them all consistent so you can use special characters.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Hi Ray

I thought that had fixed the problem, however it's thrown up a new set of issues that weren't there before! A lot of characters that were displaying correctly before are now displaying incorrectly on the live sites - example in PM below. Seems to be mostly apostrophes and dashes that are wrong.

Sign in to reply to this post

Ray BorduinWebAssist

They were out of sync before, so they probably show incorrectly in the cms as well now.

There is really no way to fix the problem without breaking it in some places that were encoded improperly in the first place.

At this point you will have to find and fix those pages improperly encoded in the past. The issue will be fixed moving forward I believe, and you can re-enter the improperly encoded characters now and they won't be an issue anymore.

I think now the character will show the same when entered through the CMS, through phpMyAdmin, and when displayed on either site. Until this update they would always be broken in one place or the other, but unfortunately any special characters entered in the past will still be incorrect in one or more location until re-entered now that the problem is fixed.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...