I want to add a bibliography of primary sources to an article, and sort its entries alphabetically according to Sanskrit alphabet, using IAST and utf-8, a, ā, i, ī, u, ū and so on, how can I tell biblatex / biber to do that? I guess I have to define that alphabet myself, how is that done?
A minimum working example:
\documentclass{article}
\usepackage{fontspec}
\usepackage{filecontents}
\usepackage[style=authoryear-ibid,backend=biber,sorting=anyt]{biblatex}
\begin{filecontents*}{mwe.bib}
@misc {Hevajratantra,
title = {Hevajratantra},
note = {something},
}
@book {Mṛgendratantra,
title = {Mṛgendratantra},
note = {something else},
}
\end{filecontents*}
\addbibresource{mwe.bib}
\begin{document}
\nocite{*}
\printbibliography{}
\end{document}
As expected the bibliography first lists the Hevajratantra, then the Mṛgendratantra, as per the Latin alphabetical order. In the Sanskrit alphabet though M is before H, the Sanskrit alphabet being completely different from the Latin alphabet. I could deal with this problem manually by, for example, adding a sortkey field to each bibliography entry, but I assume for most bigger languages one can tell biblatex / biber e.g. via polyglossia how to do the sorting according to the respective language. I wonder what would be the way to get it done automatically for transliterated Sanskrit?
After some more searching it seems that I'd need to build a table for the Unicode Collation Algorithm, following the data format of this one, https://github.com/plk/biber/blob/master/data/latinkeys.txt, which I'd then need to feed to biber. Doesn't look too complex, I'll try to find a temporary solution.

--collate_options="table => <filename>". See the documentation for that option here: http://search.cpan.org/~sadahiro/Unicode-Collate-1.09/Collate.pm – PLK Dec 21 '14 at 18:56biblatex3.4/3.5? – moewe Sep 13 '16 at 07:38