\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
...
\newwrite\outfile
\immediate\openout\outfile=\jobname.txt
% aßbc is a replacement for a long german text-block, with many ß inside
\immediate\write\outfile{ "aßbc"}
\immediate\closeout\outfile
produces as file content:
"a\T1\ss bc"
but I want the string
"aßbc"
yes, I can replace \T1\ss with ß in a postprocess-step, but I like to know how to do it from LaTeX
\unexpanded{ß}? May be not :) – Manuel Aug 07 '15 at 11:48