* fixed wrong use of CompareTextUnicodeStringProc() in

fpc_ansistr_compare_equal(). "make cycle" now works under Linux, but
    there is probably still a bug somewhere because I don't think that the
    compiler should ever trigger the code path the contained this bug

git-svn-id: trunk@19139 -
This commit is contained in:
Jonas Maebe 2011-09-18 11:17:37 +00:00
parent e343e6263b
commit 85ed1b87d9

View File

@ -726,7 +726,15 @@ begin
r2:=S2;
if (cp2=$ffff) or (cp2=0) then
SetCodePage(r2,DefaultSystemCodePage,false);
Result:=widestringmanager.CompareTextUnicodeStringProc(UnicodeString(r1),UnicodeString(r2));
//convert them to utf8 then compare
SetCodePage(r1,65001);
SetCodePage(r2,65001);
Maxi:=Length(r1);
temp:=Length(r2);
Result := Maxi - temp;
if Result = 0 then
if MaxI>0 then
result:=CompareByte(r1[1],r2[1],MaxI);
end;
end;