WordPress.org

Ready to get started?Download WordPress

Forums

Apostrophe's & " " replaced by weird characters (3 posts)

  1. addcoach
    Member
    Posted 4 years ago #

    I restored an ancient version of wordpress 1.52 backup via MySQL database to WP 3.0 and now these strange characters are throughout my blog in place of the apostrophe's ’ and in place of double quotes I get these
    “ and ”

    Following one thread's advice, I've tried changing charset from the default UTF-8 to ISO-8859-1 in reading-encoding for pages and feeds but this doesn't work, just gets new weird characters

    Following another one's advice, I've tried modifying the config.php to

    Commenting these out like this:
    //define('DB_CHARSET', 'utf8');
    //define('DB_COLLATE', '');

    and neither works.

    Any ideas?

  2. addcoach
    Member
    Posted 3 years ago #

    any suggestions? wild guesses?

  3. Vijay Padiyar
    Member
    Posted 3 years ago #

    If the issue is seen in blog/post titles, the best way to fix this is to do what WordPress itself does.

    Use the following code to get the blog title, instead of using just get_option(‘blogname’) or get_bloginfo(‘name’):

    wp_specialchars_decode(get_option(‘blogname’), ENT_QUOTES);

    This will ensure that the apostrophe special characters are reconverted back to the apostrophe before being displayed.

    Regards

    Vijay Padiyar

Topic Closed

This topic has been closed to new replies.

About this Topic