# glossaries: Setting unicode character as entry label

Why does the following compile with lualatex and fail with pdflatex when setting entry label to be Unicode character?

% arara: pdflatex: { options: [ '-synctex=1', '-shell-escape' ]}
% arara: makeglossaries
% arara: pdflatex: { options: [ '-synctex=1', '-shell-escape' ]}

\documentclass{elsarticle}

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

\usepackage{booktabs}
\usepackage{calc,siunitx}
\usepackage[automake,stylemods,symbols,
abbreviations,
xindy={codepage=utf8, language=greek, glsnumbers=false}
]{glossaries-extra}

\makeglossaries
\glsnoexpandfields
\glsxtrnewsymbol[text={\alpha},description={spacing},symbol={[\si{\um}]},type=main]{α}{$\alpha$}

\begin{document}
\printglossary[title=Nomenclature]
\end{document}
• Probably for the same reason \documentclass{article}\begin{document}α\end{document} fails with pdflatex? It just doesn't know what to do with α. – schtandard Jul 24 '19 at 20:36
• @schtandard so, how to fix it while using a Unicode character in case of pdflatex? – Diaa Jul 24 '19 at 20:39
• I think you misunderstand, pdftex cannot do that. One of the big selling points of luatex and xetex is native Unicode support, which pdftex just does not have. Why do you insist both on using pdftex and typing α? – schtandard Jul 24 '19 at 20:48
• @schtandard that's rather misleading the inputenc support in (pdf)latex would allow an input α alpha to be defined, just as accented latin is defined. – David Carlisle Jul 24 '19 at 20:51
• @DavidCarlisle Ok, maybe my choice of words was a bit too absolute (after all, pdftex can do anything, even control a mars rover). What I meant was that pdftex is only set up with very limited Unicode support and the need for more would be reason enough to switch to luatex, I think. Of course, one could endeavor to extend inputenc towards completeness.. – schtandard Jul 24 '19 at 21:01

With lualatex α is a plain, simple letter. Not different to a.

With pdflatex α is a rather complicated command, and you can't use commands in such places.

To see the difference you can compile this:

\documentclass{article}

\begin{document}
\ExplSyntaxOn
\tl_analysis_show:n {α}
\ExplSyntaxOff
\end{document}

With lualatex you get:

The token list contains the tokens:
>  α (the letter α).