Losing CRs on import from Endnote -- Zotero bug?

I posted this in the 2.0beta category, but maybe it really belongs here.

I'm trying to import a large (~1700 item) bibliography into Zotero from Endnote X2 running on OS X 10.5.

Following suggestions made in previous forum threads, I have tried RIS format (BibTex seems to have more issues). Problem: all the hard returns in my notes are getting blown away, and the note text appears in Zotero as one long paragraph. I found a forum discussion from last year -- http://forums.zotero.org/discussion/4248/ -- that seemed to conclude on the point that some of the issues with missing CRs when importing notes had been fixed last summer.

However, today, in 2.0b6.5 and now 2.0b7, I am seeing the same problem when importing: all of the CRs in my notes and research notes are lost.

I notice that a number of other fields are wonky, but it looks like Endnote is to blame for those. E.g., it exports "Call Number" and "Language" as notes (N1 tag). So, those will have to be fixed (somehow?) on the Endnote side. For the missing CRs in notes, though, I've checked the RIS file coming out of Endnote and there are indeed CRs there. They are just not getting picked up by Zotero.

Finally, I tried adding CRs into one note, exporting the item as RIS from Zotero, and then re-import it again. This produced an interesting result. The content of the RIS file looks like this:

...
N1 - <p>Notes line 1.</p>
<p>Notes line 2.</p>
<p>Notes line 3.</p>

It seems, then, that Zotero can put XHTML into the notes. This looked very encouraging -- could it be the solution? Alas, when I re-imported the RIS file, the notes one again were all collapsed onto a single line. So, this looks like(?) a bug in the Zotero RIS parser.

I would like to move my bibliography to Zotero, but it contains hundreds of items with multi-paragraph notes, and I can't justify the time to go through and re-CR them all. This is a show-stopper.

Any ideas about a possible work-around?
  • edited September 15, 2009
    No need to double-post. (I've removed your earlier thread.)
  • Follow-up: here is a possible work-around. In zotero/translators/RIS.js, make the following two changes:

    At the beginning of processTag(), comment out the first three lines of code:

    // if (Zotero.Utilities.unescapeHTML) {
    // value = Zotero.Utilities.unescapeHTML(value.replace("\n", "<br>", "g"));
    // }


    In doImport(), change:

    if(tag == "N1" || tag == "N2" || tag == "AB" || tag == "KW") {
    // preserve line endings for N1/N2/AB fields, for EndNote
    // compatibility
    data += "\n"+rawLine;


    to:

    if(tag == "N1" || tag == "N2" || tag == "AB" || tag == "KW") {
    // preserve line endings for N1/N2/AB fields, for EndNote
    // compatibility
    data += "<br />"+rawLine;


    Caveats: this is a hack. I don't completely understand the translator code, and I've only tested this on OS X. It may not be a viable solution on other platforms. That said, after I made these two changes, I was able to read in my RIS file from Endnote and all the CRs in the notes were preserved.
  • I couldn't get those line changes to work (Zotero 2b7.2, OS X 1.5.8).

    However, this problem doesn't appear in the 'stable' Zotero release, so I got around this by importing my RIS bibliography in the old version of Zotero, and then upgrading.
Sign In or Register to comment.