mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
* Try a new approach in helpers.OpenTextFile(), helpers.ReadTextfile() and helpers.ReadTextfileChunk(): Based on TStreamReader instead of TFileStream now, so we can finally rely on Delphi internals for detecting a file's encoding. Also, this should fix read errors in some UTF-8 files, e.g. mentioned on http://www.heidisql.com/forum.php?t=13044
* Remove helpers.DetectEncoding(). Use a separate TStreamReader in the only caller to detect the encoding of a selected file * Remove helpers.ScanNulChar() * Remove helpers.RemoveNulChars()
This commit is contained in:
@ -111,11 +111,6 @@ begin
|
||||
if LB <> '' then
|
||||
text := StringReplace(text, LB, CRLF, [rfReplaceAll]);
|
||||
|
||||
if ScanNulChar(text) then begin
|
||||
MessageDialog(_(SContainsNulCharGrid), mtInformation, [mbOK]);
|
||||
text := RemoveNulChars(text);
|
||||
end;
|
||||
|
||||
// TODO: Find out why the Delphi IDE insists hinting that this
|
||||
// property is ANSI when it is in fact a WideString.
|
||||
memoText.Text := text;
|
||||
|
Reference in New Issue
Block a user