UTF-8 is a transcodet format that constains
Unicode-Data.
Unicode has 2 bytes per char.
I already found a mistake with myself:
Code:
[color=#0000ff]{ read a buffer }[/color]
SetLength(Buf, i + [color=#ff0000](bytesToRead div 2)[/color]);
but:
Zitat:
{ open file as binary, 1 byte recordsize }
However, there the file not binary, but in WideChar steps is processed, the statement was not right.
[add]
I re-worked the function/demo and still a UTF8 version with inserted.