View Single Post
Old 06-25-2011, 04:42 AM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This got complicated. Two problems:

1) must check each author in the author_sort, but that means a complicated regexp that checks for ampersands. Didn't need to do this for authors.
2) must build a character class to handle letter equivalences in some languages.

For an example or the second problem, in some locales the letters S and Š are to sort as equivalent letters. The search must find either letter whether it is a first or later author (later authors are identified by the & character). The regex that calibre now generates to do that is
Code:
author_sort:"~(^[ŠS])|(&\\s*[ŠS])"
Code changes submitted.
chaley is offline   Reply With Quote