mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-22 10:59:23 +02:00
Masks: fix TMask.Matches() when converting the case alters UTF8Length Issue #0026790). Based on patch by laz-andy.
git-svn-id: trunk@46339 -
This commit is contained in:
parent
51ab663b7f
commit
1d7f7a7b0a
@ -289,7 +289,7 @@ var
|
|||||||
if fCaseSensitive then
|
if fCaseSensitive then
|
||||||
CharValue := GetCodePoint(AValue,I)
|
CharValue := GetCodePoint(AValue,I)
|
||||||
else
|
else
|
||||||
CharValue := Utf8UpperCase(GetCodePoint(AValue,I));
|
CharValue := Utf8LowerCase(GetCodePoint(AValue,I));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Inc(FMask.MinLength);
|
Inc(FMask.MinLength);
|
||||||
@ -374,6 +374,8 @@ var
|
|||||||
end;
|
end;
|
||||||
mcAnyChar:
|
mcAnyChar:
|
||||||
begin
|
begin
|
||||||
|
//CP := GetCodePoint(S, CharIndex);
|
||||||
|
//writeln('mcAnyChar: CP = ',UTF8ToConsole(CP),' CharIndex = ',CharIndex);
|
||||||
if CharIndex > L then Exit;
|
if CharIndex > L then Exit;
|
||||||
Inc(CharIndex);
|
Inc(CharIndex);
|
||||||
end;
|
end;
|
||||||
@ -411,7 +413,10 @@ begin
|
|||||||
if fCaseSensitive then
|
if fCaseSensitive then
|
||||||
S := AFileName
|
S := AFileName
|
||||||
else
|
else
|
||||||
S := Utf8UpperCase(AFileName);
|
begin
|
||||||
|
S := Utf8LowerCase(AFileName);
|
||||||
|
L := Utf8Length(S);
|
||||||
|
end;
|
||||||
Result := MatchToEnd(0, 1);
|
Result := MatchToEnd(0, 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user