mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:59:11 +02:00
LCL: fixed GuessEncoding iterating UTF-8 characters
git-svn-id: trunk@15770 -
This commit is contained in:
parent
5972f2bf98
commit
5bd40abaab
@ -4481,14 +4481,14 @@ begin
|
|||||||
inc(p);
|
inc(p);
|
||||||
end else begin
|
end else begin
|
||||||
i:=UTF8CharacterStrictLength(@s[p]);
|
i:=UTF8CharacterStrictLength(@s[p]);
|
||||||
DebugLn(['GuessEncoding ',i,' ',DbgStr(s[p])]);
|
//DebugLn(['GuessEncoding ',i,' ',DbgStr(s[p])]);
|
||||||
if i=0 then begin
|
if i=0 then begin
|
||||||
{$IFDEF VerboseIDEEncoding}
|
{$IFDEF VerboseIDEEncoding}
|
||||||
DebugLn(['GuessEncoding non UTF-8 found at ',p,' ',dbgstr(copy(s,p-10,20))]);
|
DebugLn(['GuessEncoding non UTF-8 found at ',p,' ',dbgstr(copy(s,p-10,20))]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
inc(p);
|
inc(p,i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if p>l then begin
|
if p>l then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user