If you mean you are using direct_output then the Writeln just writes what it is given "as-is"

So if you want ANSI in your file use Utf8ToAnsi if you want UTF8 then don't

Note ReadLn in 20.x will assume UTF8