I write the file out.csv, which contains umlauts and tried to read it in.
How can I make this work?
\documentclass[margin=5pt, varwidth]{standalone}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\begin{document}
\newwrite\out
\immediate\openout\out=out.csv
\foreach[count=\n from 0] \word in {ä, ö, ü, ß, x, y}{
\immediate\write\out{\n; \word }% works not
%\immediate\write\out{\n; \detokenize{\word} }% works not too
}
\immediate\closeout\out
\input{out.csv}
\pgfplotstableread[col sep=semicolon, header=false]{out.csv}{\mytable}
\pgfplotstabletypeset[string type]{\mytable}
\end{document}


\protected@iwritefrom https://tex.stackexchange.com/a/542425/38080? Maybe it's more general... – Rmano May 28 '21 at 15:48