mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:58:12 +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);
|
||||
end else begin
|
||||
i:=UTF8CharacterStrictLength(@s[p]);
|
||||
DebugLn(['GuessEncoding ',i,' ',DbgStr(s[p])]);
|
||||
//DebugLn(['GuessEncoding ',i,' ',DbgStr(s[p])]);
|
||||
if i=0 then begin
|
||||
{$IFDEF VerboseIDEEncoding}
|
||||
DebugLn(['GuessEncoding non UTF-8 found at ',p,' ',dbgstr(copy(s,p-10,20))]);
|
||||
{$ENDIF}
|
||||
break;
|
||||
end;
|
||||
inc(p);
|
||||
inc(p,i);
|
||||
end;
|
||||
end;
|
||||
if p>l then begin
|
||||
|
Loading…
Reference in New Issue
Block a user