• I keep getting ’ and other things in my posts. WordPress is replacing – ‘ and ” with other weird things. How do I disable this and fix all my posts?

Viewing 4 replies - 1 through 4 (of 4 total)
  • What happens if you change your text encoding to utf-8?

    Thread Starter Rub3X

    (@rub3x)

    It’s already at UTF-8. =\

    Thread Starter Rub3X

    (@rub3x)

    Ok for anyone with this issue I found this:

    http://www.moskalyuk.com/blog/removing-curly-quotes-from-wordpress-20/

    Open

    $curl = preg_replace(“/’s/”, ‘’s’, $curl);
    $curl = preg_replace(“/'(\d\d(?:’|’)?s)/”, “’$1”, $curl);
    $curl = preg_replace(‘/(\s|\A|”)\’/’, ‘$1‘’, $curl);
    $curl = preg_replace(‘/(\d+)”/’, ‘$1″’, $curl);
    $curl = preg_replace(“/(\d+)’/”, ‘$1′’, $curl);
    $curl = preg_replace(“/(\S)'([^’\s])/”, “$1’$2”, $curl);
    $curl = preg_replace(‘/(\s|\A)”(?!\s)/’, ‘$1“$2’, $curl);
    $curl = preg_replace(‘/”(\s|\S|\Z)/’, ‘”$1’, $curl);
    $curl = preg_replace(“/'([\s.]|\Z)/”, ‘’$1’, $curl);
    $curl = preg_replace(“/ \(tm\)/i”, ‘ ™’, $curl);
    $curl = str_replace(“””, ‘”’, $curl);

    Open wp-includes/functions-formatting.php and comment out those lines. Also avoid using MS office, because apps like that use those as well. Try editing in note/wordad or the WP editor.

    Now..does anyone know how to remove all previous posts that have those chars in it? A simple find replace query won’t work, it has SQL errors idk why. Using a text editor won’t work either =\

    andyhowardidau

    (@andyhowardidau)

    I’m having the same issue, and have followed the updated fix for WordPress 2.1 outlined at:

    http://mhinze.com/remove-curly-quotes-from-wordpress-21/

    No love – still having this problem, see screeny.

    I have ‘Reading’ set to ‘UTF-8’ in WP Admin, and I’m calling this setting in header.php as per this post. The mySQL collation is utf8_unicode_ci.

    Note: This is only an issue for posts that were copied and pasted from Word, but I’ve only had this problem since migrating to (mt) – (mt) is running an older version of mySQL than my previous host.

    Anyone know how to remove these ‘special’ characters?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Weird Chars ’’ is closed to new replies.