OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Error when entering metadata with accented characters

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

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.

Error when entering metadata with accented characters

Postby StephenMiller » Tue Jun 13, 2006 7:51 am

Hi,

I am entering as a Title in the Edit Metadata screen the following:

Linguistische Aspekte literarischer Übersetzung (am Material des Romans ‚Der Idiot‛ von F.M. Dostoevskij)

This returns me the error message:

DB Error: Data too long for column 'keyword_text' at row 1

I have figured out that the problems lies with the accented character: replacing the Ü with Ue solves the problem.

I notice that if you enter a single accented character on its own, there is no error messsage, doubling the character produces the error message as above.

Entering typographic quotes (as seen in the title above) causes no problems.

Does anyone have any idea what is going wrong?

Thanks,
Stephen Miller
StephenMiller
 
Posts: 5
Joined: Tue Jun 13, 2006 5:49 am

Postby asmecher » Tue Jun 13, 2006 9:07 am

Hi Stephen,

Chances are you're not using database connection character set support; this can be configured in OJS's config.inc.php using the "connection_charset" and "database_charset" directives and must be supported by your database.

When these features are disabled, you can run into the error you describe because:
  • According to OJS, the string length of a string containing accents is simply the number of characters, because PHP supports UTF8 natively
  • However, according to the database, the number of characters required to store that string can be up to twice as many, since the database does not natively handle UTF8 characters.
  • Therefore, if a field's maximum length according to PHP is the same as the maximum length according to the DBMS, you won't be able to store longer or heavily-accented strings that use UTF-8 characters in the DBMS.
Full UTF-8 support requires MySQL >= 4.1.1 or PostgreSQL >= 7.1.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: No registered users and 3 guests