TurboPower_iPro: Fix UTF8 issue in a way that ConvertEncoding is not called if text is already UTF8 encoded. Issue #37992.

git-svn-id: trunk@64088 -
This commit is contained in:
wp 2020-10-29 23:08:58 +00:00
parent f3603ca4db
commit ba446c3a93

View File

@ -5799,7 +5799,7 @@ begin
{$IFDEF IP_LAZARUS} {$IFDEF IP_LAZARUS}
Lst := TStringList.Create; Lst := TStringList.Create;
GetSupportedEncodings(Lst); GetSupportedEncodings(Lst);
if Lst.IndexOf(FDocCharset)=-1 then if Lst.IndexOf(FDocCharset) = 0 then // clear for UTF-8 to avoid conversion
FDocCharset := ''; FDocCharset := '';
Lst.Free; Lst.Free;
{$ENDIF} {$ENDIF}
@ -7840,7 +7840,7 @@ begin
ListLevel := 0; ListLevel := 0;
StartPos := CharStream.Position; StartPos := CharStream.Position;
{$IFDEF IP_LAZARUS} {$IFDEF IP_LAZARUS}
FDocCharset := 'UTF-8'; FDocCharset := '';
FHasBOM := false; FHasBOM := false;
Ch1 := GetChar; Ch1 := GetChar;
Ch2 := GetChar; Ch2 := GetChar;