• Resolved capbussat

    (@capbussat)


    Some of the tables of a plugin use unicode content such as this: “Gestión de stocks” after updating by using Beta Test plugin in a local environment now the contents in database has changed to “Gesti�n de stocks”.
    This happens for all this table contents. It seems to me this is produced as some copying of tables in the installation which the updating process has done?
    I am not expert in MySQL database, MySQL version 5.5.60 (which I can not change in my testing development environment)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The upgrade should not change your table encoding.

    In your wp-config.php, what are your DB Charset and Collation set to? They usually look like this:

    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    Thread Starter capbussat

    (@capbussat)

    /** Database Charset to use in creating database tables. */
    define( ‘DB_CHARSET’, ‘utf8’ );

    /** The Database Collate type. Don’t change this if in doubt. */
    define( ‘DB_COLLATE’, ” );

    It’s exactly the same.

    Thread Starter capbussat

    (@capbussat)

    I opened Adminer and I see that in my tables appears latin_swedish_ci WHICH SEEMS IT WAS THE DEFAULT while in worpress tables appears utf8mb4_unicode_ci.
    This may be my fault. So this must be the problem?
    Nevertheless , I do not undersand why the update of WordPress copies my data to the tables again, because definetely the data was right before the update to 5.4.

    • This reply was modified 4 years, 1 month ago by capbussat.
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    This stems from changes made in 2015 actually

    https://make.ww.wp.xz.cn/core/2015/04/02/the-utf8mb4-upgrade/ explains a lot of it, but the tl;dr is that your site should have auto-updated the database stuff for you back with WP 4.2 (yeah, I know).

    We saw a few sites have this problem back then, though I’ve not seen any since 5.0.

    Try changing your settings to this:

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

    Yes, blank ’em both out. See if that works.

    If so, my guess is that your test site just recently met the requirements and tried to upgrade.

    Thread Starter capbussat

    (@capbussat)

    I suppose DB_CHARSET applies only to new database tables? So, in this case it will not change the tables anyway.
    Thanks.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    It won’t change existing tables, no.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changes to unicode characters plugin tables upgrading to 5.4’ is closed to new replies.