Import fails, then generates duplicates

2»
  • OK, not sure what happened when I applied the changes manually, but Frank's new patch works. Committed and pushed. Thanks.
  • I didn't notice this at the time, but something has been omitted in the applied patch VS the suggested patch:
    1834a1840,1843
    > } else {
    > // Even if exporting to UTF-8, we still need to translate some characters to
    > // their BibTeX equivalent (e.g. quotes).
    > value = value.replace(/[\u2018\u2019\u201C\u201D]/g, mapAccent);

    This has, AFAIK, not been applied. Thus for the moment, exporting the following to bibtex does not work very well:

    the folllowing entry,

    @article{bouyssou_democracy_1992,
    title = {Democracy and efficiency - A note on {\textquoteleft}{Arrow{\textquoteright}s} theorem is not a surprising result{\textquoteright}},
    volume = {58},
    journal = {European Journal of Operational Research},
    author = {D. Bouyssou},
    year = {1992},
    pages = {427–430}
    }

    after import and export to bibtex, reads

    @article{bouyssou_democracy_1992,
    title = {Democracy and efficiency - A note on {‘Arrow’s} theorem is not a surprising result’},
    volume = {58},
    journal = {European Journal of Operational Research},
    author = {D. Bouyssou},
    year = {1992},
    pages = {427–430}
    }
    
    This is a bit odd as the usual way to bibtex-encode quotes is to use {\textquoteleft} and the like. Moreover, (at least on my system) the resulting entry does not display the quotes after bibtex-ing and latex-ing.

    Most probably that part of the patch should now be updated to reflect other changes that happened in the meantime. Does anyone know why this part has been omitted? Does it involves some problems I didn't expect?
  • edited July 13, 2010
    // Even if exporting to UTF-8, we still need to translate some characters to
    // their BibTeX equivalent (e.g. quotes).
    value = value.replace(/[\u2018\u2019\u201C\u201D]/g, mapAccent);

    This is a bit odd as the usual way to bibtex-encode quotes is to use {\textquoteleft} and the like
    The encoding works if you are not using UTF-8. Can you comment on the claim that translation of the quote characters is needed if exporting to UTF-8? Is this just from personal experience or do you have examples of other programs that do this and/or documentation? JabRef, for example, retains the quote characters in UTF-8 files.
  • It was indeed based on personal experience. Now that you mention that, I realize I had forgotten to add \usepackage[utf8]{inputenc} in my latex source.

    Following your information that other softwares also use utf-8 in bibtex files, I guess this is the right behavior for zotero and my comment is therefore unuseful. Sorry and thanks for your reply.
Sign In or Register to comment.