• Resolved rwallin

    (@rwallin)


    I’ve seen various post regarding the Char Set tage and even removing the define(‘DB_CHARSET’, ‘utf8’); in the config file to resolve issues but none of these are fixing my issues.

    Everything looks perfect in the admin when i’m adding new post/pages or updating but when I go to view I’m getting characters (appears to only be numbers) that are getting replaced.

    I.E.

    Saturday – 10am -ńpm
    should be
    Saturday – 10am -5pm

    Coming May?nd 2009
    should be
    May 22nd 2009

    I’ve changed the char set tag in the head .. did not fix anything
    commenting out the DB_CHARSET in the config but it did nothing

    any other ideas?
    Thanks in advance

Viewing 14 replies - 1 through 14 (of 14 total)
  • Does the char set and collation of your database and tables match what is in your wp-config.php file?

    Thread Starter rwallin

    (@rwallin)

    this was not happening before a recent upgrade

    Config file = define(‘DB_CHARSET’, ‘utf8’);
    Char Set = <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>

    How do I check the collation of the database?

    thanks man!

    How do I check the collation of the database?

    Log into phpMyAdmin, click on the database and look at the tables…each table will have a collation (and many of the text-type fields in the tables will have a collation)…hopefully the fields and the tables will be the same. Then, look below the last row in the db and you will see the collation of the db.

    Thread Starter rwallin

    (@rwallin)

    got 2 different collations

    utf8_general_ci
    latin1_swedish_ci

    confused as to why….what should it be?

    Thread Starter rwallin

    (@rwallin)

    it actually looks the same on the many other WordPress sites I have running

    Yes, that is common, but it’s a common problem. Unfortunatley, there is no easy fix. Search for encoding and database encoding on the forums here (and via google) to see posts with various approaches to address the problem. Untimatley, you want everything to have the same encoding and ideally (in my opinion) it should be utf8_unicode

    Thread Starter rwallin

    (@rwallin)

    I’ve searched and read and still have no idea how to resolve my problem.
    It really doesn’t make any sense since this is not a consistent problem.

    Here’s another example

    Phone: (704) ?-9995
    Fax: (704) 825-1750

    should be

    Phone: (704) 825-9995
    Fax: (704) 825-1750

    I have no idea what it does it for the first set of 825 of the phone number but not the next instance of 825

    I use UTF-8 General myself….

    Latin seems to be the default for alot servers though (all the ones i’ve used)…

    You can actually change the DEFAULT collation in phpmyadmin, though it’s not immediately obvious how..

    Thread Starter rwallin

    (@rwallin)

    just cant figure why this just started to happen.
    So you’re saying you can do like a global change to the collation in phpmyadmin?

    You can set the ‘default’ collation, that way new tables inherit the default, which is likely to currently be Latin or something else.

    In regard to updating tables and rows ‘already set’ there may be a query, but i’ve always done it manually myself…

    You’d have to be careful though, changing collation ‘can’ screw up tables and/or data in those tables…

    Google where necessary (that’s what i do)…

    I use UTF-8 General myself….

    Here is a good summary of the difference between utf8_general and utf8_unicode

    https://forums.mysql.com/read.php?103,187048,188748#msg-188748

    So you’re saying you can do like a global change to the collation in phpmyadmin?

    Not that I’m aware of…you can change these manually. Also, note that changing existing db, table, and text-type field collations, does not change the encoding of existing data in the db…so, doing this can result in some “unexpected” results. If you search, you may run across some scripts to change the data, but none of them will be able to do the job with 100% accuracy.

    Thread Starter rwallin

    (@rwallin)

    still trying to get my head around this .. Why does the content look normal in the backedn of WP and even in the database table but not when it is being displayed to the user.

    This just recently started to happen … Is there any chance a plugin is conflicting somewhere?

    Great link BTW!

    Is there any chance a plugin is conflicting somewhere?

    You should be able to eliminate that possibility by deactivating all plugins. Switch to the default theme to eliminate the theme as a possibility as well.

    Thread Starter rwallin

    (@rwallin)

    found the problem, I installed the WP-Obscure to test it and it seems to be the issue in converting the display of characters.
    Everything is good now .. thanks for all the help guys

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Characters Being Replaced’ is closed to new replies.