# error when using accented words in glossary

I don't know if you can use accented words with the latex glossary package but I think you can because it would seems like a stupid limitation. I'm french and if I want to define an accented term such as "métadonnée" and use

\newglossaryentry{métadonnée} { name={métadonnée}, description={text} }

I get a error message :

! Undefined control sequence.
\GenericError ...
#4 \errhelp \@err@ ...


I've done some research but nobody seems to use accented words in glossary! It looks like a problem with encoding but I think that all my packages are good. Here's what I use :

\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage[nonumberlist]{glossaries}
\usepackage{color}
\usepackage{textcomp}
\usepackage{here}
\usepackage{float}
\usepackage{fancyhdr}


EDIT : here's a minimal example to reproduce what happens so you can see that it won't compile with pdflatex :

\documentclass[10pt,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[nonumberlist]{glossaries}
\usepackage{hyperref}
\makeglossaries

{
description={text}
}

\begin{document}
\printglossaries

• I am not sure but I don't think that glossaries allows accented characters as glossary key name. You should use \newglossaryentry{metadonnee} and \gls{metadonnee} respectively – user31729 Mar 23 '17 at 20:26
• @Christian Hupfer: Maybe using xindy in the place of makeindex? – Bernard Mar 23 '17 at 21:42
• @Bernard: The issue happens at LaTeX level. The first argument of \newglossaryentry is used to define some internal commands. So to handle this you have to add \detokenize to a lot of lines inside glossaries.sty. (And I don't know if this works ;-) ) A complete explanation is given by egreg: tex.stackexchange.com/questions/175240/… – Marco Daniel Mar 23 '17 at 22:23
• @MarcoDaniel: I see. Thanks for the link. A workaround seems to write \newglossaryentry{metadonnee}%without accents { name={métadonnée}, %% printed word description={text} } – Bernard Mar 23 '17 at 22:42