I need to parse \jobname to extract some metadata (such as the subject of a letter) that is encoded in the filename of the .tex file. The filenames are not restricted to ASCII, but maybe any UTF8 charcater. In particular, I have lots of files with German Umlauts in their name. However, compiling:
% Änderungen.tex
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\jobname
\end{document}
with pdflatex yields:

With lualatex or xelatex the output is fine; however, I would prefer to stay with pdflatex. So how is \jobname actually encoded and how can I transform it?
