mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
In OpenTextFile(), when detecting the file's encoding, loop through 100K of text instead of only 16K, to make it slightly more stable against BOMless files containing only few UTF8 chars. Fixes issue #1860.
This commit is contained in:
@ -1976,7 +1976,7 @@ const
|
|||||||
UNICODE_BOM_SWAPPED = Char($FFFE);
|
UNICODE_BOM_SWAPPED = Char($FFFE);
|
||||||
UTF8_BOM = AnsiString(#$EF#$BB#$BF);
|
UTF8_BOM = AnsiString(#$EF#$BB#$BF);
|
||||||
MinimumCountOfUTF8Strings = 1;
|
MinimumCountOfUTF8Strings = 1;
|
||||||
MaxBufferSize = $4000;
|
MaxBufferSize = 100000;
|
||||||
|
|
||||||
// 3 trailing bytes are the maximum in valid UTF-8 streams,
|
// 3 trailing bytes are the maximum in valid UTF-8 streams,
|
||||||
// so a count of 4 trailing bytes is enough to detect invalid UTF-8 streams
|
// so a count of 4 trailing bytes is enough to detect invalid UTF-8 streams
|
||||||
|
Reference in New Issue
Block a user