mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 04:49:43 +02:00
TurboPower_iPro: Fix IpHtmlPanel ignoring text encoding defined by <meta charset="..."> tag. Patch by Zaher Dirkey, issue #37374.
git-svn-id: trunk@64092 -
This commit is contained in:
parent
847d16d3b9
commit
24575cfd7c
@ -5717,18 +5717,21 @@ begin
|
||||
Name := FindAttribute(htmlAttrNAME);
|
||||
Content := FindAttribute(htmlAttrCONTENT);
|
||||
{$IFDEF IP_LAZARUS}
|
||||
if SameText(HttpEquiv, 'content-type') and not FHasBOM then begin
|
||||
j := pos('charset=', lowercase(Content));
|
||||
if j>0 then begin
|
||||
j := j+8;
|
||||
i := j;
|
||||
while (j<=Length(Content)) do begin
|
||||
if Content[j] in [' ',';','"',','] then
|
||||
break;
|
||||
inc(j);
|
||||
if not FHasBOM then begin
|
||||
if SameText(HttpEquiv, 'content-type') then begin
|
||||
j := pos('charset=', lowercase(Content));
|
||||
if j>0 then begin
|
||||
j := j+8;
|
||||
i := j;
|
||||
while (j<=Length(Content)) do begin
|
||||
if Content[j] in [' ',';','"',','] then
|
||||
break;
|
||||
inc(j);
|
||||
end;
|
||||
fDocCharset := copy(content, i, j-i);
|
||||
end;
|
||||
fDocCharset := copy(content, i, j-i);
|
||||
end else
|
||||
end
|
||||
else
|
||||
fDocCharset := FindAttribute(htmlAttrCHARSET);
|
||||
if pos('windows', Lowercase(fDocCharset)) = 1 then
|
||||
fDocCharset := NormalizeEncoding(StringReplace(fDocCharset, 'windows', 'cp', [rfIgnoreCase]));
|
||||
|
Loading…
Reference in New Issue
Block a user