Unicode replacement character � showing up on Rackspace server

Hi all,

I've been getting an encoding problem on our server with sites built in Concrete 5.7 -- many characters including the £ symbol are being displayed as the Unicode replacement character, a question mark inside a diamond.

I have tried many solutions to this, my mySQL database is all in UTF-8, with the collation set to utf8_general_ci.

What seems to be happening is that the data in the database is somehow being sent as Windows-1252 encoding, and the browser is expecting unicode, so displays these characters in place of the Windows-1252 representations of the special characters.

This doesn't happen on my local environment, curiously enough. Hopefully someone will be able to shed some light on this, as I'm a bit baffled.


View Replies:
antaquanota replied on at Permalink Reply
I've now solved this issue, this might be useful for anyone else experiencing problems with encoding:

Go to the database.php file in the application/config folder.

To the array 'connections'=>'concrete', add the following property: 'driverOptions' => array(1002=>'SET NAMES utf8')

So your 'concrete' array will now look like this:

'concrete' => array(
            'driver' => 'c5_pdo_mysql',
            'server' => 'localhost',
            'database' => 'ethos_db',
            'username' => 'usr',
            'password' => 'pass',
            'charset' => 'utf8',
            'driverOptions' => array(
                    1002=>'SET NAMES utf8'
rge replied on at Permalink Reply
This also seems to solve the following error
htmlentities(): Invalid multibyte sequence in argument

seafolk replied on at Permalink Reply 1 Attachment
This solution helps with bug - "Load error! (parsererror)" in the Dashboard > Sitemap

Console log: appendAjax failed: parsererror...
Controller index.php/tools/required/dashboard/sitemap_data returns an empty response.