Skip to content
Permalink
Browse files

Issue #515: give ReadTextfileChunk a BufferPadding of 1 instead of 10…

…M. With 10 attempts, we get a maximum of 10 Bytes which is more than enough to get a complete character in any multibyte encoding. See #515 (comment)
  • Loading branch information...
ansgarbecker committed Sep 17, 2019
1 parent d114ef1 commit 0da8cb79f8316ed8cda39c7b3db6a5cf73befcba
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/apphelpers.pas
@@ -1299,7 +1299,7 @@ function DetectEncoding(Stream: TStream): TEncoding;

function ReadTextfileChunk(Stream: TFileStream; Encoding: TEncoding; ChunkSize: Int64 = 0): String;
const
BufferPadding = SIZE_MB;
BufferPadding = 1;
var
DataLeft, StartPosition: Int64;
LBuffer: TBytes;

0 comments on commit 0da8cb7

Please sign in to comment.
You can’t perform that action at this time.