I found a simpler approach, which works for me:
\usepackage{listings}
\lstset{
literate={ö}{{\"o}}1
{ä}{{\"a}}1
{ü}{{\"u}}1
}
I found a simpler approach, which works for me:
\usepackage{listings}
\lstset{
literate={ö}{{\"o}}1
{ä}{{\"a}}1
{ü}{{\"u}}1
}