Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7683 closed defect (bug) (invalid)

character "é" converted to "é" after upgrade from 2.5.1 to 2.6.1

Reported by: aloon Owned by:
Milestone: Priority: low
Severity: minor Version: 2.6.1
Component: General Keywords:
Focuses: Cc:


I upgraded my weblog from 2.5.1 to 2.6.1, and I noticed that after the upgrade, the character "é" in posts and in post titles got converted to "é". I changed it back to the é character manually and it would display fine, but this is quite labour intensive, certainly if it will happen again during an upgrade in the future.

If it's of any relevance, I use the popular K2 theme. Plugins I use are Akismet, XML Google Maps and OpenID. My weblog is located here: http://www.alexandervanloon.nl/wordpress/

Attachments (4)

phpmyadmin.png (162.7 KB) - added by aloon 10 years ago.
screenshot of database tables in phpMyAdmin
phpmyadmin_fixed.png (159.6 KB) - added by aloon 10 years ago.
phpmyadmin_overview.png (90.2 KB) - added by aloon 10 years ago.
phpmyadmin_collation.png (91.8 KB) - added by aloon 10 years ago.

Download all attachments as: .zip

Change History (13)

#1 @Viper007Bond
10 years ago

Database charset issue. Your database probably wasn't UTF-8 previously but I believe it is now as WordPress properly forces UTF-8.

#2 @aloon
10 years ago

Thank you for your quick reply. Concerning the database, the webhost serving my weblog is using MySQL 5.0.22, and currently phpMyAdmin says: MySQL charset: UTF-8 Unicode (utf8), and MySQL connection collation: utf8_unicode_ci. AFAIK I never changed those settings, so I'm not sure if my database wasn't UTF-8 all along? However, I do remember migrating from another webhost, and importing a backup of the database in my new WordPress installation on my new webhost. I'm not sure if the database was UTF-8 during it's time at my old webhost, so maybe the cause could lie there?

So it seems that this happened just once, and I won't encounter this during future upgrades? And if this is a database issue, it's not a bug in WordPress, am I correct? Shall we close this bug then?

10 years ago

screenshot of database tables in phpMyAdmin

#3 @aloon
10 years ago

Wait a minute, I just checked the tables of my database in phpMyAdmin. As you can see a lot of tables are latin1_swedish_ci. Could that be the problem?

#4 @Viper007Bond
10 years ago

Hmm, seems way back in 2.2 was when the switch was made:


#5 @aloon
10 years ago

Thank you for your help, I tried following the instructions on that page on the Codex to convert the database to UTF8, but I'm rather disappointed now. First of all, step 3 and other steps take an huge amount of work, I have to execute the command for every column in the tables of my database if I understand correctly. I started the work and enter the queries in phpMyAdmin, but after converting a few columns succesfully, I receive the following error message when I'm trying to alter the user_nicename column in the wp_users table:

SQL query:

ALTER TABLE wp_users MODIFY user_nicename BLOB

MySQL said: Documentation #1170 - BLOB/TEXT column 'user_nicename' used in key specification without a key length

Are there any easy instructions and an easy solution for people like me, who aren't MySQL experts? The page on the Codex talks about conversion scripts and plugins, but one of them doesn't have a working link and the other one corrupts data according to the page.

#6 @DD32
10 years ago

That reference is very dodgy... very dodgy..

See Also: #7554

Which mentions: http://eazyvg.linuxoss.com/2008/05/fixing-wordpress-and-mysql-charset-problem-especially-when-importing-from-one-blog-to-another/

The best way to fix it appears to be an Export from within WordPress, Creating a new database with utf8_general_ci collation/charset, Installing WordPress into the new database, and then doing an import..

#7 @aloon
10 years ago

Thank you very much DD32. I followed your instructions succesfully it seems. However, please take a look at the screenshots I attached, because I'm not sure if it's all right now.

All of WordPress' tables use utf8 now, but the OpenID plugin still seems to use latin1_swedish_ci, and that also seems to be the default. Even though MySQL charset and collation are utf8 and unicode according to phpMyAdmin's welcome screen (I never changed this). Is this a problem? Under the "Operations" tab of the database, I seem to have the option to change the collation, which is currently latin1_swedish_ci, should I do this?

#8 @DD32
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

but the OpenID plugin still seems to use latin1_swedish_ci,

Depending on how the plugin creates the table, it might just pick up the standard table config. of the server, Its not generally a problem unless you're storing non-ascii characters (like acented characters, or double byte characters(such as chinese i think))

You can change the collation in phpmyadmin as you see, but AFAIK its doesnt touch the data, only affects future data thats stored, So change it to urf8 if you wish for consistancy.

I'm going to close this as invalid now since its not a WordPress actual 'bug', but you can reply without re-opening if need be.

#9 @mrmist
10 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.