#1 2012-12-11 10:08:03

Chris75018
Member
From: France
Registered: 2012-09-14
Posts: 26
Website

TSynTableFieldProperties.SortCompare with tfoCaseInsensitive in Option

Hi,

when sorting UTF8 Field with tfoCaseInsensitive in Options, I have a difference between Upper character and lower character.
If someone is interested for this, I've modified source code like this :

Unit SynCommons;

function TSynTableFieldProperties.SortCompare(P1, P2: PUTF8Char): PtrInt;
{...}
        if tfoCaseInsensitive in Options then begin
          i := 0;
          while i<L do
          if NormToUpperAnsi7[P1[i]]<>NormToUpperAnsi7[P2[i]] then begin
             //  result := PtrInt(P1[i])-PtrInt(P2[i]);    <-- Before        
            result := PtrInt(NormToUpperAnsi7[P1[i]])-PtrInt(NormToUpperAnsi7[P2[i]]);
            exit;
          end else
            inc(i);
        end else begin
{...}

Offline

#2 2012-12-11 12:21:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,187
Website

Re: TSynTableFieldProperties.SortCompare with tfoCaseInsensitive in Option

Should be fixed by http://synopse.info/fossil/info/12b3ab6c7f

Thanks for the report!

Offline

Board footer

Powered by FluxBB