WordPress.org

Forums

weird characters with 2.7 update (21 posts)

  1. brandonsnhl
    Member
    Posted 6 years ago #

    I just updated a clients blog with the most recent update and now everywhere there is special text like quotes or italics there now appears a  before and after the text. go to http://www.atheismsfallacies.com/blog to see what I mean.

    Is there an easy way to fix this or do I have to edit each post individually? Please tell me there is an easy way to fix this.

    Thanks

  2. brandonsnhl
    Member
    Posted 6 years ago #

    sorry wrong link- the blog is http://www.atheismsfallacies.com/blog

  3. darrinb
    Member
    Posted 6 years ago #

    Hi, the blog got hacked. Go to the site and check the source code. Right after the body tag, you should see alot of lines that look like:

    <u style='display:none'><a href="http://www.olathekids.org/awstats/post.php?p=7-20927">Free Mobil Ringtone Virgin</a> <a href="http://www.olathekids.org/awstats/post.php?p=7-3269">Alexisonfire Ringtone</a> <a href="http://www.olathekids.org/awstats/post.php?p=7-14337">Motorola Hi Fi Ringtone</a> <a href="http://www.olathekids.org/awstats/post.php?p=7-16587">The Game This Is How We Do Ringtone</a>

    I checked your source and it's riddled with this.

  4. brandonsnhl
    Member
    Posted 6 years ago #

    Well, I figured it out... just in case anyone else needs to know all I did was go to my phpMyAdmin and check the database for the Collation. In my database it happens to be latin1_swedish_ci I have no idea why but that's what it said... So I opened wp_config.php and added the Collation code to it as follows:

    The following line was left blank by default:
    define('DB_COLLATE', '');

    I simply changed it to:
    define('DB_COLLATE', 'latin1_swedish_ci');

    and uploaded it and it fixed the problem.

    I hope that helps others.

  5. darrinb
    Member
    Posted 6 years ago #

  6. shields
    Member
    Posted 6 years ago #

    OK -- mine does this since upgrading to 2.7. It's not hacked. However, like brandonsnhl, my Collation is latin1)swedish_ci. But his fix doesn't fix it. Instead, implementing his fix changes the weird character to a black diamond with a white questionmark in it ( � ) in FireFox and into a square in IE7.

    Any thoughts?

  7. darrinb
    Member
    Posted 6 years ago #

    That's an encoding error.

    Check your encoding settings in your Dashboard ( Settings > Reading > Encoding ) and check the encoding set in your header:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  8. meesha
    Member
    Posted 6 years ago #

    I'm having a similar problem. I upgraded 8 blogs from 2.6.5 to 2.7 and all went fine except the one with the most posts (400+). At first I had the same problem with "Â" in the text, but after changing my wp-config.php from "define('DB_COLLATE', '');" to "define('DB_COLLATE', 'utf8_general_ci');" this removed most of them. Now the only problems remaining are with ' showing up as "’", (like in "I’ll"), and left" showing up as "“" with right" showing up as "”", (like in "“My Favorites”").

    Any ideas on these types of errors?

  9. figaro
    Member
    Posted 6 years ago #

    It's all related to unicode encoding. I've run into this on several different sites and haven't found any magic fix...use google and you'll find lots of discussions about this on virtually all php/mysql apps.

    I would recommend ensuring your database, all the tables in the database, your config.php file, and the encoding in your dashboard are all set to utf8 encoding. Then make sure the strange characters are not showing up in your new posts. If you still have them in your old posts, then you could dump your database, do a find/replace to clean them out and then import it back.

  10. meesha
    Member
    Posted 6 years ago #

    Everything is set to utf8. I'm not getting these weird charactures in new posts, just the old ones.

    Part of the problem may be that I moved this site from a shared server to a dedicated one (had to create a new MySQL database) and exported all my tables (each one seperatly) and imported them to the new database. I had to have my hosting company import the posts table for me as they have a 2 MB limit on self-importing of tables and this one was 7 MB+. That table shouldn't be that large except for the new auto-save feature has caused so many revisions that the table size is about 10 times larger than it should be. I've installed a plugin that turns off the auto-save but I'm concerned that if I do the same for the revisions and try to clean out all the extra records that I'll screw the table up. My host takes about 24 hours to do the import so don't want to be a day behind in comments, etc.

  11. shields
    Member
    Posted 6 years ago #

    dbmartin -- Thanks -- my encoding is set to UTF-8. My header is fine to.

    Thanks for trying. I have about 300 posts and am not savy enough to massage the data in bulk.

  12. dirtnyureye
    Member
    Posted 6 years ago #

    After upgrading from 2.6.7 to 2.7.0, I'm having the same problem with the weird characters showing up. Anyone else have suggestions?

    My settings in the database are all UTF-8, wp-config.php is correct, the meta tag in the header also has the correct charset.

    I did NOT set the define('DB_COLLATE', 'utf8_general_ci'); in the wp-config.php because I don't think that's the problem.

  13. jennsoer
    Member
    Posted 6 years ago #

    I am having the same problems with any page document in which the content originally came from a microsoft word document!

    Click any link on this page to see the symbols coming up:
    http://little-hypotenuse.com/papers

    Early today, everything was fine.
    Then I upgraded to 2.7.

    What to do???

  14. jennsoer
    Member
    Posted 6 years ago #

    Nevermind!!!

    Brandon's fix actually DID work for me.

    Thank you :D

  15. dirtnyureye
    Member
    Posted 6 years ago #

    jenn - brandon's fix worked in some instances for me but in other instances, turned things into black diamonds like shields mentions above.

  16. pfeldman
    Member
    Posted 6 years ago #

    Brandon,

    Thank you so very much for your helpful post. It gave me insight to fix my issue:

    Feedburner was parsing corrupted characters of my feeds. The fix, based on your solution, was go to PHPMyAdmin and alter the database for wp-posts, which in my case was latin1_swedish_ci, to utf8_unicode_ci.

    Once again, thanks for your very helpful post!

  17. fbruno69
    Member
    Posted 6 years ago #

    I had the same problem - which happens with every update.

    I new it was simply a line in one of the config files I had to comment/uncomment,
    And found the answer again in this thread:
    http://wordpress.org/support/topic/163109?replies=11

  18. redpillnews.org
    Member
    Posted 6 years ago #

    brandonsnhl,

    I had the exact same problem as you. I was migrating from an older mysql 4.1.x database to 5.x.x. After the import a bunch of weird characters were showing, especially the funny A

    I went in and edited my wp-config file, added the text you showed us and it fixed my problem too. Hope that helps someone else upgrading from older mysql database.

    Cheers'

  19. groovyKimo
    Member
    Posted 6 years ago #

    Hi all

    For me this did the trick after updating to 2.7:

    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', 'utf8_unicode_ci');

    As I understand it, db_collate should be the same setting as in your database, where you can set the db_collate for the whole database, while every table got a charset-setting too. In my database, everything is utf8_unicode_ci.

    Hope this helps someone... :)

  20. Asta
    Member
    Posted 6 years ago #

    There is a plugin that solves this without monkeying with the config file:

    http://wordpress.org/extend/plugins/utf-8-database-converter/

  21. rickandersonaia
    Member
    Posted 5 years ago #

    Here's how I fixed the problem.
    1. Make sure the database has everything at utf-8
    2. Make sure WP settings has utf-8
    3. Edit the PHP.ini file on my server to add default_charset = "utf-8"

    That fixed it - I relied on this article UTF-8: The Secret of Character Encoding to help me understand the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic