Javascript API: is var fieldName = "ALL" (or something) possible?

I want use the Javascript API to batch replace corrupted macrons. When I reinstalled, more than 1/2 of my macrons were converted to two-character representations (i.e. vowel + overscore), which doesn't show in Zotero but is clearly visible in Word. (BTW, this is a serious bug.)

I looked at http://www.zotero.org/support/dev/client_coding/javascript_api#examplebatch_editing
and it seems straightforward, but I don't know what variable I should use to affect all fields in all entries.

Is there a "var fieldName" value that I could input to batch replace in every single field in every single entry?

I want to change:
u‾ > ū
o‾ > ō
etc.

There are probably 2500 individual instances that I need to change (in sources I cite regularly), and some more that I would like to. Manual update isn't really an option.

Thank you.
  • Update:

    Apologies for suggesting that this is entirely a Zotero issue. I was exhausted and panicked with a deadline looming.

    The other culprit is the "Times" font (at least). Changing to Times New Roman (and also Cambria) fixed the issue. The strange thing is that there really is a difference in the Zotero database, because when I fix individual instances with find-replace, they are fixed regardless of font in Word.

    I'd still love the answer to my question so that I can put an end to this problem, but it's no longer urgent.

    Again, my bad.
  • (BTW, this is a serious bug.)
    I've encountered this problem with some items which were automatically added (through translators). But I can't remember on which website.
    Do you have the same issue with manually added items ? If not, can you provide the link of the faulty website ?
    every single field in every single entry?
    I'm not completely sure but I don't think it's possible (related to this).
  • I don't know if there is an easier solution, but it would be pretty easy to just get a list of all field names (e.g. from here http://aurimasv.github.io/z2csl/typeMap.xml or from the respective place in the code) and then just put them in an array and iterate through them.
  • Thank you both for your replies.

    Gracile:
    I've encountered this problem with some items which were automatically added (through translators). But I can't remember on which website.
    Google Scholar seems to be one of the culprits.
    Do you have the same issue with manually added items ?
    I don't have issues with manually added items because I paste the macron-ized vowels from Word in that case.

    adamsmith:

    Thanks for the suggestion. I might try this... or I might just wait for the 4.2 release that's scheduled to have batch find-replace (right?)
  • re 4.2 - the main feature will be field updates. Batch edit is unfortunately still a maybe as of now.

    the macron issue could be related to bibtex somehow (we use GS's bibtex for import). Someone mentioned this in another thread - I know very little about character encoding and afaik Zotero doesn't actually deal with that at all (relying on Firefox for anything encoding related).

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.