In BCB64 Rio this code: String tmpStr; while(!UTF16TextReader.Eof) UTF16TextReader.Readln(tmpStr); Works as infinite loop (UTF16TextReader.Eof is always false). In BCB32, Delphi32, Delphi64 its works as expected.