1

Help, my site is suddenly populated with weird characters, like this:

“Do what you love and do it often,†“If you don’t like your job, quit,†and “Travel often; Getting lost will help you find yourself.â€

What do I do to remove it?

Link to Website.

Here's an example.

  • "Suddenly"? You really should find out, what has corrupted your data – this looks like the charset of either your database, database connection or HTML document has changed. Best option to get rid of those garbled chars, is to restore a backup of your database. In case you didn't have a backup start crying now and swear, that you will store backups regularly from now on. – feeela Apr 29 '12 at 14:47
  • Your content is sent with a wrong charset value. An image won't do it, add a real URL to your question so we can see the HTTP headers. – fuxia Apr 29 '12 at 15:09
  • The site is causecapitalism.com – markratledge Apr 29 '12 at 16:44
1

It appears that the site is still using the Unicode character set from the page header, but the database may have been corrupted. Ask Linode for a backup restore and/or if they changed anything with their MySQL servers.

If you don't run your own regular database backups, you should. Try WordPress › WP-DB-Backup « WordPress Plugins.

You can also use phpmyadmin at Linode to check the collation of the database and repair it. Or use WordPress › Portable phpMyAdmin « WordPress Plugins from inside the WP admin.

0

I found this post which gave me desired results... This can be remove simply by running a short SQL query on your WordPress database, using the command line client or PhpMyAdmin.

Here's a solution copy/pasted from this link

Always keep a backup copy of your database before you make any changes.

UPDATE wp_posts SET post_content = REPLACE(post_content, '“', '“');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€', '”');
UPDATE wp_posts SET post_content = REPLACE(post_content, '’', '’');
UPDATE wp_posts SET post_content = REPLACE(post_content, '‘', '‘');
UPDATE wp_posts SET post_content = REPLACE(post_content, '—', '–');
UPDATE wp_posts SET post_content = REPLACE(post_content, '–', '—');
UPDATE wp_posts SET post_content = REPLACE(post_content, '•', '-');
UPDATE wp_posts SET post_content = REPLACE(post_content, '…', '…');

UPDATE wp_comments SET comment_content = REPLACE(comment_content, '“', '“');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€', '”');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '’', '’');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '‘', '‘');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '—', '–');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '–', '—');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '•', '-');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '…', '…');
0

In addition to the above, I was still having the problem in front of the "read more" links on summary pages. Below is what fixed it for me, so I'm posting it here in case anyone else has this exact same scenario.

I'm totally shocked. After hours of trying things and testing, I finally found the "Settings" then "Readings" option below: "Encoding for pages and feeds". After changing from UTF-7 to UTF-8, everything looks good again.

enter image description here

And even stranger, after changing it to UTF-8, the option disappears from the page. According to WordPress site, this option was removed since release 3.5.

-1

You can try commenting out the encoding type in the wp-config. Sometimes that works.

//define('DB_CHARSET', 'utf8');

//define('DB_COLLATE','utf8_unicode_ci');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.