Sorting Reference with non-english characters
Hi
Been looking in the forums, but not found anything conclusive on this. In my Reference section in word, the sort order does not handle my Swedish authors correctly. IE Ö gets sorted with O, Ä and Å gets sorted with A.. Is there any way to correct this?
Incidentally, the same behavior is observed in Stand-alone as well as in Firefox.
with kindest regards, John
Been looking in the forums, but not found anything conclusive on this. In my Reference section in word, the sort order does not handle my Swedish authors correctly. IE Ö gets sorted with O, Ä and Å gets sorted with A.. Is there any way to correct this?
Incidentally, the same behavior is observed in Stand-alone as well as in Firefox.
with kindest regards, John
http://gsl-nagoya-u.net/http/pub/zotero-processor.xpi
It will swap in the latest processor version, which has more refined locale-based sorting smarts. If the style uses a Swedish locale, it should sort those characters by Swedish conventions.
Thanks for your help, but I might need a bit more to get this cleared up, as I am a newbie.
I've installed the processor, both in Firefox, and standalone. Restarted everything. Sort order is still incorrect.. What do you mean with Swedish locale? I can't find any locale setting in Zotero? When you say it's per style, do you mean citation style? I'm using Harvard or APA 6, but not sure how those would be modified to accomodate non-english characters.
Using Zotero 4.0.21.2
With kindest regards, John
To be clear, I am writing a thesis in English, using word. But some of my references would be international, using non-english characters. Zotero is used with english UI.
With kindest regards, John
So the first question is whether Swedish characters should always be sorted using Swedish conventions, regardless of the language in which the bibliography is presented. There would be a case, at least, for applying English sorting conventions in an English document, since many readers may not be aware of the Swedish rules. Is this a firm requirement?
If Swedish sort conventions are a priority, there are a couple of ways to get to that result. One would be to always discriminate accented characters, for all locales. That's obviously out, since Swedish is an outlier: most other languages would start throwing incorrect results.
An alternative would be to always set Swedish as a fallback to the default locale (the language in which the bibliography is presented). As I understand the spec under the link above, that should work. It would mean, though, that in an English document, characters that occur in Swedish would always sort using Swedish conventions, even where they also occur in other languages that adopt different sorting conventions. So there would be some sorts that come out wrong.
The only other way to get there would be to provide a setting for the sort locale, and expose that in the Zotero UI. As it's a very specialized requirement, and would be a workaround in any case, that is unlikely to materialize.
All of that said, the current processor code would clobber Swedish sort rules, even in a Swedish document (where is says 'sensitivity: "base"). I'll fix that, but it won't address this use case, unfortunately.
For what it's worth, and as far as I can tell, the Chicago Manual of Style does not provide any guidance on cross-language sorting. I think that would imply an assumption for CMS, at least, that English conventions (e.g. A = Ä) should be applied across the board.
In regards to the 'sensitivity: "base"' comment above, I'm fairly certain that what is considered "base" is locale-dependent. That is to say that, while Ö in en-US is converted to the base letter O, in sv-SE Ö is already a base letter and is compared as is (but Ó is converted to base):
'Ö'.localeCompare('O', 'sv-SE', {sensitivity:'base'}) == 1
So I think that you should keep the sensitivity option as is.'Ö'.localeCompare('O', 'en-US', {sensitivity:'base'}) == 0
'Ó'.localeCompare('O', 'sv-SE') == 1
'Ó'.localeCompare('O', 'sv-SE', {sensitivity:'base'}) == 0
'Ö'.localeCompare('Z', 'sv-SE', {sensitivity:'base'}) == 1
Having said this, @J.Koukoutsas what style are you using? If you're using a style that supports multiple locales, setting extensions.zotero.export.bibliographyLocale to "sv-SE" should have produced correct sorting (but it would have also changed some words in the bibliography to Swedish if the translation exists).
Edit: Nvm, I see
Edit: this is with APA 6th edition. Harvard (I assume the "Elsevier Harvard" that comes pre-installed with Zotero) does not support multiple locales, en-US only.
@J.Koukoutsas: Following on from @aurimas' comment above, you can get Swedish sort order in an English bibliography by preparing a custom style. The adjustments needed are very simple, and as we've put you through the experience of this thread, I'll be happy to whip up a copy for you, if you need it for your paper; just post a request back to this thread.