Delphi7在这一点上有点妖,如果用了CaseSensitive,它转而调用了AnsiCompareStr
function TStringList.CompareStrings(const S1, S2: string): Integer;
begin
if CaseSensitive then
Result := AnsiCompareStr(S1, S2)
else
Result := AnsiCompareText(S1, S2);
end;
如果你看一下AnsiCompareStr的帮助
Note: Most locales consider lowercase characters to be less than the corresponding uppercase characters. This is in contrast to ASCII order, in which lowercase characters are greater than uppercase characters. Thus, setting S1 to 'a' and S2 to 'A' causees AnsiCompareStr to return a value less than zero, while CompareStr, with the same arguments, returns a value greater than zero.
它说了:因为很多淫认为大写的就是大,小写的就是小,拉个ascii与一般淫的常识不一致,所以如果你要求排序时区分大小写的话,俺就把小写的a淫为比大写的A小,所以blabla.....