• steveadams617

    (@steveadams617)


    I downloaded a copy of the database using WordPress Database Backup plugin from a machine with WP 2.0.5installed. I then installed 2.0.5 on my machine and used phpMyAdmin to restore the data from a SQL script. Everything looks okay except special characters like apostrophes and dashes which are being displayed as diamonds with questions marks in Firefox and question marks in IE.

    My research indicates they are probably special characters that got introduced into the database from people composing their entries in Word and then copy and pasting into WordPress with curly quotes and apostrophes.

    I tried the following from the last post in http://wordpress.org/support/topic/79157?replies=5

    “Use that to open your sql file
    Find a faulty character – just check what it looks like
    Now Select All
    Then from the Format menu, choose ‘Encode in UTF-8’
    If there is a change to the faulty character, the sql file is wrong”

    I used the file with the fixed characters to re-upload the data to the server and the little characters are still there. I downloaded using phpMyAdmin and looked at the file and I don’t see the characters. Very strange. I made sure to chage the structure of the tables to Unicode before I uploaded.

    I thought maybe the old version was getting cached somehow, so I treid editing a post and the little characters are in the text editor in WP.

    This kind woman suggests doing a mysql update query: http://www.likoma.com/search-and-replace-using-php-myadmin/ It seems like I would need to know the magic update statement for a variety of characters.

    Bottom line: The old server seems to deal just fine with this extra little characters. I’ve checked all the plugins, etc. Is there some setting I’m missing that would make this offensive little characters either behave or a way I can change/delete them globally?

    Thanks
    Steve

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am also having this problem. Is there a fix?

    Sounds to me like a Msyql version mismatch. The only decent cure is to make sure the new server is a later version (or equal) to the old server.

    I wanted to post back to say that I found a fix for this. In requires accessing phpMyAdmin. Then, run the following, depending on what you need:

    To search for fancy hyphens and replace them with regular hyphens:

    1.
          UPDATE wp_posts SET post_content = REPLACE (post_content, '—', '-')

    To search for fancy quotes and replace them with regular quotes:

    1.
          UPDATE wp_posts SET post_content = REPLACE (post_content, '“', '"')

    To search for fancy apostrophes/single quotes and replace them with regular apostrophes:

    1.
          UPDATE 01_posts SET post_content = REPLACE (post_content, '

    ‘, ‘'’)

    `

    Oops. That last fix didn’t post right. In the second set of single quotes, for what the fancy apostrophe/single quote should be replaced with, should be:
    & # 39 ;

    (with no spaces!)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Curly quotes and apostrophe’s showing as wierd characters on new server.’ is closed to new replies.