OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Import/Export pluggin encoding problem

OJS development discussion, enhancement requests, third-party patches and plug-ins.

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

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Import/Export pluggin encoding problem

Postby ntorres » Wed May 18, 2011 4:37 am

Hi

I'm using ojs 2.1.1 and it works fine until I change the server which hosted it.

When I visit the journal home page and access to published issues I have no problem; even when the editor access to an issue or article. But when I use the import/export plugin to export data I get an encoding error.

Using the navigator can can't read the xml file, and if save the xml file using the mouse right button I get a file with encoding problems.

Can anyone help me?
ntorres
 
Posts: 65
Joined: Thu Nov 17, 2005 1:19 am

Re: Import/Export pluggin encoding problem

Postby jmacgreg » Tue May 24, 2011 6:14 am

Hi ntorres,

Can you tell us exactly which error you are getting?

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: Import/Export pluggin encoding problem

Postby ntorres » Wed May 25, 2011 12:41 am

Hi,

The problem is that the xml file generated uses a bad encoding for the issue and article data. For example

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE issue PUBLIC "-//PKP//OJS Articles and Issues XML//EN" "http://pkp.sfu.ca/ojs/dtds/native.dtd">
<issue published="true" current="false">
<title>Vol.: 1 Núm.: 1</title>
<volume>1</volume>
...
and not
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE issue PUBLIC "-//PKP//OJS Articles and Issues XML//EN" "http://pkp.sfu.ca/ojs/dtds/native.dtd">
<issue published="true" current="false">
<title>Vol.: 1 Núm.: 1</title>
<volume>1</volume>
...

When the file is showed using the browser, depending which kind of browser (Explorer, Firefox, Chrome) and versions the error is different and matches with the first strange character found. As the file will contain bad encoded information it can't be used for the purpose for which it was exported.
ntorres
 
Posts: 65
Joined: Thu Nov 17, 2005 1:19 am

Re: Import/Export pluggin encoding problem

Postby jmacgreg » Fri May 27, 2011 9:27 am

Hi ntorres,

You can find more information on character encoding here. Additionally, you should still be able to save and subsequently edit any XML file you export, regardless of errors, although the strange characters will still show up. You may also want to double-check that when you changed the server, you recreated the database on the second server to match the database character encoding on the original server. Let us know if none of this advice helps out.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: Import/Export pluggin encoding problem

Postby ntorres » Mon May 30, 2011 3:16 am

Hi James,

to recreated the database on the second server I use a mysql dump from the first server that includes the create database sentence, so the two databases would be equals. It's an estrange problem because it only appears when you use the import/export plugin... when the database content is showed in other ojs page there are no problem.
ntorres
 
Posts: 65
Joined: Thu Nov 17, 2005 1:19 am

Re: Import/Export pluggin encoding problem

Postby jmacgreg » Sat Jun 04, 2011 8:13 pm

Hi ntorres,

I suspect that this may be a bug in your version of OJS, but I'm having trouble tracking a relevant report down. Is there any chance you could try upgrading to a more recent version?

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests