# How can I use expl3 text_uppercase for hyperref bookmarks with German umlauts?

When I use text_uppercase with German umlauts and hyperref option "unicode=true", the umlauts get replaced by 'A's with a tilde in the bookmarks. I set the option "unicode=true" due to the fact that I have to use greek letters for the numbering of one of the section levels. For that I use 'textgreek'-letters, which only work in the bookmarks with the hyperref unicode option... Is there any solution to that problem?

\documentclass{book}
\usepackage[T1]{fontenc}

\usepackage{hyperref}
\hypersetup{
unicode=true,
bookmarksnumbered=true
}
\ExplSyntaxOn
\cs_set_eq:NN\textupper\text_uppercase:n
\ExplSyntaxOff
\begin{document}
\tableofcontents
\chapter{\textupper{Über die Einöde}}% umlauts get replaced in bookmarks
\end{document}


The following seems to work but I didn't check many cases.

\documentclass{book}
\usepackage[T1]{fontenc}

\usepackage{hyperref}
\hypersetup{
unicode=true,
bookmarksnumbered=true
}

%\usepackage{bookmark}
\ExplSyntaxOn
\newcommand\textupper{}

\pdfstringdefDisableCommands
{
\cs_set:Npn\textupper #1{ \use:e {\text_uppercase:n {#1}} }
}

% if also in the headings
%\cs_set_eq:NN\textupper\text_uppercase:n
\ExplSyntaxOff
\begin{document}
\tableofcontents
\chapter{\textupper{Über die Einöde}}%
\end{document}

• A real pro.... - Thank you so much!! (It seems to work perfectly..) Jun 8 '20 at 18:47