MySQL charset problems

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

MySQL charset problems

Postby ramon » Fri Sep 16, 2005 12:07 pm


During the last training we provided I ran into a problem with the database charset.

The tblusers fields chUsername, chPassword, chFirstName, chLastName where set to iso-swedish-ci.

I'm thinking this is the MySQL installation that is not set to UTF-8. Must the database creation script be modified to solve this issue? I think this is a version problem, because with 1.1.7 we never faced this. I'm not sure if it is with 1.1.9+ or a MySQL version problem.

The system uses the informed chLastName to create usernames. If there are special characters in it, then the editor cannot change the username or the password, because they are returned after inclusion with corrupted characters.

The added user cannot login either, because the database does not recognize the username or password and then we cannot change the information.

Any ideas on how to solve this??

Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

more MySQL Charset issues version 1.x

Postby ramon » Thu Sep 29, 2005 2:40 pm

Dear OJSers,

As the new MySQL has added the charset and collation features, I'm running into problems with updating a pretty old installation.

Since the upgrade is not working, what we are planning to do is install a 1.1.10 first, the migrate the table data. The problem is that the current installation is using something like iso (since the server has been updated, it may be latin1_swedish_ci, as it is the default).

Because we copied the data into a utf-8 database, as you may have guessed, lots of data is corrupted (since we use lots of special charcters) many user names, last names, even passwords are now unavailable.

The author index, which once worked, now does not list authors correctly, because it cannot recognize accented characters as one byte (instead they are 2-byte..), so our author index has either two sets of E's (with a hack we created to list accented letters as the original non-accented letter), or an author with the surname Évora is listed among the A's... (also, you should list the author index by last name first, since that's the way the letters link the authors...).

I guess what I'm looking for are suggestions to solve this problem... because I'm running out of ideas and time...

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby asmecher » Thu Sep 29, 2005 10:41 pm

Hi Ramon,

This may be a simplistic idea, but have you considered running a mysqldump from the old database through iconv and loading into the new UTF-8 database?


Return to “OJS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest