# Alphabetic sorting fails in biblatex when defining characters with \newcommand

I'm citing an Icelandic guy whose last name has a first character Á (U+00C1). If I write his name in my bibliography with that character code (\char"00C1), the sorting works correctly. If, however, I define the character Á as \auppercaseacute in my preamble with \newcommand, the sorting fails. What is going on here?

\documentclass{article}
\usepackage{fontspec, filecontents}
\usepackage[style=authoryear]{biblatex}
%\newcommand{\auppercaseacute}{\char"00C1}
\begin{filecontents}{\jobname.bib}
@BOOK{mccartney1974,
AUTHOR = "Paul McCartney",
TITLE = "A cool book about guitars",
YEAR = "1974"}
@BOOK{arnason2007,
TITLE = "Íslensk orðabók",
YEAR = "2007",
EDITOR = "Mörður {\char"00C1}rnason"}
\end{filecontents}
\begin{document}
\cites{mccartney1974}{arnason2007}
\printbibliography
\end{document}


\documentclass{article}
\usepackage{fontspec, filecontents}
\usepackage[style=authoryear]{biblatex}
\newcommand{\auppercaseacute}{\char"00C1}
\begin{filecontents}{\jobname.bib}
@BOOK{mccartney1974,
AUTHOR = "Paul McCartney",
TITLE = "A cool book about guitars",
YEAR = "1974"}
@BOOK{arnason2007,
TITLE = "Íslensk orðabók",
YEAR = "2007",
EDITOR = "Mörður {\auppercaseacute}rnason"}
\end{filecontents}
\begin{document}
\cites{mccartney1974}{arnason2007}
\printbibliography
\end{document}


-
Is there any specific reason why you can't use Á in this instance? I seem to remember to have read something about special treatment of {\char"xxxx} constructs by biblatex, but I can't find it now. – moewe Oct 17 '13 at 21:33
Biber doesn't perform macro expansion. The entry is alphabetized under "R". – egreg Oct 17 '13 at 21:34
moewe: But as you can see, {\char"xxxx} works fine. As I said in another biblatex question (tex.stackexchange.com/questions/65490/…): I prefer defining my characters in terms of their Unicode codes, cuz then anyone can open my .tex and .bib files on any computer with any fonts, and know exactly what characters I intend to be displayed. That's a big deal in my field. Plus I use a lot of characters you can't just type on the keyboard. – Sverre Oct 17 '13 at 21:36
@Sverre If you are concerned with sorting, just say \newcommand{\auppercaseacute}[1]{\char"00C1} and use {\auppercaseacute{A}}rnason in the .bib file. But I'd not worry too much: if somebody is UTF-8 impaired it's their fault. – egreg Oct 17 '13 at 21:44
This should be fixed in biber 1.8. The problem was when wrapped in braces it would try to remove braces first which is fraught with problems. Now it doesn't try to do this. – PLK Oct 19 '13 at 7:22