diff options
-rw-r--r-- | src/base/UTextEncoding.pas | 1 | ||||
-rw-r--r-- | src/encoding/Auto.inc | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/base/UTextEncoding.pas b/src/base/UTextEncoding.pas index 148cd5d4..0c9ba4cc 100644 --- a/src/base/UTextEncoding.pas +++ b/src/base/UTextEncoding.pas @@ -92,6 +92,7 @@ implementation uses StrUtils, pcre, + UCommon, ULog; type diff --git a/src/encoding/Auto.inc b/src/encoding/Auto.inc index 487e2e42..8c32b5d0 100644 --- a/src/encoding/Auto.inc +++ b/src/encoding/Auto.inc @@ -69,7 +69,6 @@ var Error: PChar; ErrorOffset: Integer; begin - // NOTICE: Log.LogError() is not possible here because it isn't loaded inherited Create(); self.FallbackEncoder := FallbackEncoder; self.UTF8Encoder := UTF8Encoder; @@ -82,7 +81,8 @@ begin if self.Regex = Nil then begin - Log.LogError ('UTF8 Regex compilation failed: ' + AnsiString(Error) + ' at ' + IntToStr(ErrorOffset), 'EncoderAuto.Create'); + // NOTICE: Log.LogError() is not possible here because it isn't loaded + ConsoleWriteLn(Format('ERROR: UTF8 Regex compilation failed: %s at %d', [Error, ErrorOffset])); end else begin @@ -91,13 +91,15 @@ begin if Error <> Nil then begin - Log.LogError ('UTF8 regex study failed: ' + AnsiString(Error), 'EncoderAuto.Create'); + // NOTICE: Log.LogError() is not possible here because it isn't loaded + ConsoleWriteLn('ERROR: UTF8 Regex study failed: ' + Error); end; end; end else begin - Log.LogError ('pcre not loaded. utf-8 autodetection will not work.', 'EncoderAuto.Create'); + // NOTICE: Log.LogError() is not possible here because it isn't loaded + ConsoleWriteLn('ERROR: pcre not loaded. utf-8 autodetection will not work.'); end; end; |