WordPress.org

Ready to get started?Download WordPress

Forums

3.0 upgrade messed up references to filenames that contain accented chars. (5 posts)

  1. Eddie - Digital Marketing Consultant
    Member
    Posted 3 years ago #

    after upgrading from 2.8.x (maybe it was 2.9.x) to 3.1.2, all the references inside posts to filenames (usually images) which contain accented got changed.

    before, filenames that are displayed in the filesystem like "EXPRESSÃO.jpg" would be correctly called out in the post content HTML as "EXPRESSÃO.jpg". WP 3.x decided to convert those references to "EXPRESSÃO.jpg" (which is what the filename looked like when created/uploaded by the blog author), so now all the images that have such chars are broken links.

    i was able to, with the help of a perl script via SSH, obtain a list of all the files that have special chars.

    whats the quickest way to solve this problem?

    if I knew which table the conversion Ã->Ã is based upon I could convert filenames in one of the two places:

    A) i could rename the files to use the correct spelling (EXPRESSÃO.jpg -> EXPRESSÃO.jpg)

    B) i could batch update wp-posts in phpmyadmin to start using all those weird chars (EXPRESSÃO.jpg -> EXPRESSÃO.jpg)

    does anyone have any other suggestions? ONLY filenames are mangled. All other accented text works fine.

    wp-config shows (yes i already tried to comment them out)
    define('DB_CHARSET', '');
    define('DB_COLLATE', '');

    mySQL shows:
    DB Collation in effect: latin1_swedish_ci
    default DB Collation: latin1_swedish_ci
    Tables Collation: latin1_swedish_ci
    Columns Collation: latin1_swedish_ci

    PLEASE help!

  2. kmessinger
    Volunteer Moderator
    Posted 3 years ago #

    Check your wp-config file for this line. define('DB_CHARSET', 'utf8');

    For some it helps to add the line. For me, my strange characters went away after deleting the line. I also changed my db from the latin to utf8 but I am not sure that did anything.

  3. Eddie - Digital Marketing Consultant
    Member
    Posted 3 years ago #

    nope. adding utf8 messes it all up...

    converting the DB collation is no simple task, and it could make matters worse, since all other accented chars are working fine...

  4. kmessinger
    Volunteer Moderator
    Posted 3 years ago #

    My conversion was pretty easy but you are correct, if it ain't broken . . .

    I don't have any other idea. Maybe someone else will jump in here.

  5. Eddie - Digital Marketing Consultant
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Eddie - Digital Marketing Consultant
  • Latest reply from Eddie - Digital Marketing Consultant
  • This topic is not resolved
  • WordPress version: 3.1.2

Tags