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