sorting characters with accents

Is there an easy way to change how characters with accents are sorted?

For example, it seems that `ö' comes before a in the alphabet that is used for sorting now, but I think it is more common to have `ö' equivalent to `o' or `oe'.
  • What version of Zotero are you using? I know that the citation processor in the 2.1 betas has been extensively tested on just this kind of thing, so it should work there.
  • I'm not sure, but there might be a possibility that the ordering is being thrown off by the way the character is encoded behind the scenes. As Avram notes, sorting will ordinarily work correctly (and I just tested this one in Zotero 2.1b7 to be sure). There is an alternative method of encoding accented characters (the "decomposed" form) that expresses them as two characters (the accent and the character, separately). You only see the combined character on the screen, but the sort function might see them separately. I'm not sure.

    To check, try deleting the character from a field, and reentering it from the keyboard. If your OS is well-behaved, it should insert the composed form of the character.
  • I'm using Zotero 2.1b7, with word plugin 3.1b1. Reentering the character manually did not result in a correctly ordered bibliography.

    Oddly, the papers are correctly sorted in the Zotero pane, but not in the bibliography that is generated by the word plugin.
  • Those two characters set as titles on dummy items come out in the right order on my Linux system under 2.1b7. I'm not sure if it's relevant, but what are your operating system and Firefox versions? As another thought, this might be a problem with the comparison operator used in citeproc-js, which is known to have problems on some characters in some character sets. To check that as well, what are the exact titles or author names that are coming out in the wrong order in your test sort?
  • OS: Windows XP Professional
    Firefox: 3.6.14

    The offending author names (appear in this order):

    Röckmann
    Rahn
    Rhee

    And also:

    Álvarez
    Aalto
  • Okay, I can confirm that this is (yet another) problem with the Firefox localeCompare() method that I have relied on for sorting. Which is annoying, because this is a standard Javascript function that the citation formatter uses because it is meant to run (and is in fact running) in other environments as well, that are not Zotero and not Firefox.

    It can be fixed though, and it obviously needs to be. May take a few days to put together and test, but I already know roughly what the fix will look like. When done, it will feed through in a subsequent Zotero release.
  • edited March 3, 2011
    Good news. The localeCompare() operator is doing its job correctly, but it was being foiled by an unnecessary operation (forcing the characters to lowercase) that I was performing before it was invoked. I'll check in the repaired processor immediately, and it will be available in a subsequent Zotero 2.1 release.
  • annekebatenburg,

    It's a separate topic, but are you finding that the extraneous names issue that we discussed earlier has been resolved in new documents?
Sign In or Register to comment.