LCL: fixed GuessEncoding iterating UTF-8 characters

git-svn-id: trunk@15770 -
This commit is contained in:
mattias 2008-07-13 20:19:57 +00:00
parent 5972f2bf98
commit 5bd40abaab

View File

@ -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