# Problem with umlauts in glossary

The following code does not produce umlauts as expected.

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

\usepackage{glossaries}

\makeglossaries
\newglossaryentry{a}{%
name={A},%
description={a \"a {\"a} ä}%
}

\begin{document}
\glsentrydesc{a}
\end{document}


As you can see, I tried several variants. Oddly enough, in the glossary itself (produced with \printglossary) all variants for the umlaut work.

How should I use \glsentrydesc to get a correct result?

-
description is mainly meant for usage in the glossary. Do \usepackage[sanitize={description=false}]{glossaries} if you want to use \glsentrydesc in the text. – egreg Apr 4 '13 at 16:52
@egreg Thanks. This also fixes the case when the description is shown in normal uses with \gls, and changed \glsdisplay(first). If you make it an answer, I will accept it. – mafp Apr 4 '13 at 19:46

The description field is mainly meant for usage in the glossary section and for this reason (safe writing in the .glo file) it is usually sanitized, that is, transformed into a string.
You can call glossaries with the following option
\usepackage[sanitize={description=false}]{glossaries}

if you need to call \glsentrydesc in the text before typesetting the glossary. See section 2.1 in the package documentation.