You've already forked lazarus-ccr
RxMemDataSet - change AnsiUpperCase to Utf8UpperCase in locate
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2767 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -264,7 +264,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
uses CustApp, rxdconst, dbconst, Variants, math;
|
uses CustApp, rxdconst, LazUTF8, dbconst, Variants, math;
|
||||||
|
|
||||||
const
|
const
|
||||||
ftBlobTypes = [ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle,
|
ftBlobTypes = [ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle,
|
||||||
@ -296,9 +296,9 @@ begin
|
|||||||
case FieldType of
|
case FieldType of
|
||||||
ftString:
|
ftString:
|
||||||
if CaseInsensitive then
|
if CaseInsensitive then
|
||||||
Result := AnsiCompareText(PChar(Data1), PChar(Data2))
|
Result := UTF8CompareText(PChar(Data1), PChar(Data2))
|
||||||
else
|
else
|
||||||
Result := AnsiCompareStr(PChar(Data1), PChar(Data2));
|
Result := UTF8CompareStr(PChar(Data1), PChar(Data2));
|
||||||
ftSmallint:
|
ftSmallint:
|
||||||
if SmallInt(Data1^) > SmallInt(Data2^) then Result := 1
|
if SmallInt(Data1^) > SmallInt(Data2^) then Result := 1
|
||||||
else if SmallInt(Data1^) < SmallInt(Data2^) then Result := -1;
|
else if SmallInt(Data1^) < SmallInt(Data2^) then Result := -1;
|
||||||
@ -319,15 +319,15 @@ begin
|
|||||||
else if TDateTime(Data1^) < TDateTime(Data2^) then Result := -1;
|
else if TDateTime(Data1^) < TDateTime(Data2^) then Result := -1;
|
||||||
ftFixedChar:
|
ftFixedChar:
|
||||||
if CaseInsensitive then
|
if CaseInsensitive then
|
||||||
Result := AnsiCompareText(PChar(Data1), PChar(Data2))
|
Result := UTF8CompareText(PChar(Data1), PChar(Data2))
|
||||||
else
|
else
|
||||||
Result := AnsiCompareStr(PChar(Data1), PChar(Data2));
|
Result := UTF8CompareStr(PChar(Data1), PChar(Data2));
|
||||||
ftWideString:
|
ftWideString:
|
||||||
if CaseInsensitive then
|
if CaseInsensitive then
|
||||||
Result := AnsiCompareText(WideCharToString(PWideChar(Data1)),
|
Result := UTF8CompareText(WideCharToString(PWideChar(Data1)),
|
||||||
WideCharToString(PWideChar(Data2)))
|
WideCharToString(PWideChar(Data2)))
|
||||||
else
|
else
|
||||||
Result := AnsiCompareStr(WideCharToString(PWideChar(Data1)),
|
Result := UTF8CompareStr(WideCharToString(PWideChar(Data1)),
|
||||||
WideCharToString(PWideChar(Data2)));
|
WideCharToString(PWideChar(Data2)));
|
||||||
ftLargeint:
|
ftLargeint:
|
||||||
if Int64(Data1^) > Int64(Data2^) then Result := 1
|
if Int64(Data1^) > Int64(Data2^) then Result := 1
|
||||||
@ -335,7 +335,7 @@ begin
|
|||||||
ftVariant:
|
ftVariant:
|
||||||
Result := 0;
|
Result := 0;
|
||||||
ftGuid:
|
ftGuid:
|
||||||
Result := AnsiCompareText(PChar(Data1), PChar(Data2));
|
Result := UTF8CompareText(PChar(Data1), PChar(Data2));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1384,9 +1384,9 @@ var
|
|||||||
Delete(S, Length(S1) + 1, MaxInt);
|
Delete(S, Length(S1) + 1, MaxInt);
|
||||||
|
|
||||||
if (loCaseInsensitive in Options) then
|
if (loCaseInsensitive in Options) then
|
||||||
Result := AnsiCompareText(S, S1) = 0
|
Result := UTF8CompareText(S, S1) = 0
|
||||||
else
|
else
|
||||||
Result := AnsiCompareStr(S, S1) = 0;
|
Result := UTF8CompareStr(S, S1) = 0;
|
||||||
end
|
end
|
||||||
else Result := (Field.Value = Value);
|
else Result := (Field.Value = Value);
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user