# Umlauts in Biblatex Entry Label

Is it possible to have Biblatex generate a label using the correct first letters of the author's name (including umlauts)?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[safeinputenc,backend=biber, style=alphabetic]{biblatex}

\begin{filecontents}{test.bib}
@Article{Morgan,
Title   = {Article title},
Author  = {M{\"u}ller, John},
Journal = {Journal title},
Year    = {2014}
}
\end{filecontents}

\bibliography{test}

\begin{document}
\nocite{*}
\printbibliography
\end{document}


The correct label should be Mül14.

Edit: I'm sorry, I forgot to add the biblatex package option safeinputenc in the above MWE. This option seems to be the culprit for the missing umlaut in the label. I've updated the MWE to better reflect my original document.

So, is there a way to get a correct label despite using safeinputenc? I use this option in order to circumvent the declaration of some unicode chars like ǧ for which I otherwise had to add

\DeclareUnicodeCharacter{01E7}{\v{g}}


What is the best practice for using those chars not interpretable by inputenc's utf8 mode?

• Load inputenc with the correct encoding of your file. But I'm wondering if it is deliberate or an oversight that you don't get the Umlaut without inputenc. May 27, 2014 at 8:57
• @UlrikeFischer I guess it's deliberate, but maybe one could ask for a change. May 27, 2014 at 10:01
• You could remove the safeinputenc option and call biber with the option --output_safechars instead. Imho you should also add an issue to the tracker of biber. May 28, 2014 at 8:41

That's easy to achieve.

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


The first line tells LaTeX which encoding your files are using. The second line tells LaTeX to embed the real umlaut-characters as characters in the pdf, or you will get John M¨uller if you copy text out of your pdf.

Then you have to change the encoding of your documents to UTF-8 without BOM; maybe you should alos exchange all umlaut-commands {\"u} with their characters ü etc., but it's not necesary, see egregs command

In my tests I always get problems if I want to use UTF-8 with filecontents, so in this case better create a real file test.bib.

MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage[backend=biber, style=alphabetic]{biblatex}
\usepackage{csquotes}%I get a warning, if I don't add it.

\begin{document}
\nocite{*}
\printbibliography
\end{document}


Content of test.bib:

@Article{Morgan,
Title   = {Article title},
Author  = {Müller, John},
Journal = {Journal title},
Year    = {2014}
}


Output:

• It works also with author={M{\"u}ller, John}; the essential bit is loading inputenc. May 27, 2014 at 10:03
• you're right, I've updated my answer. May 27, 2014 at 11:59
• @musicman: I'm sorry, I had a mistake in my MWE. I have updated the question accordingly. May 27, 2014 at 16:33