diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a8494ab9b5..3ac7f2358b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-29 15:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/cdpapi.c + ! fixed character sort weight calculation for digraphs + 2010-11-28 20:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) - harbour/contrib/rddbm/bmdbfcdx.c - harbour/contrib/rddbm/bmdbfnsx.c diff --git a/harbour/src/rtl/cdpapi.c b/harbour/src/rtl/cdpapi.c index af58413eea..1de7cf03da 100644 --- a/harbour/src/rtl/cdpapi.c +++ b/harbour/src/rtl/cdpapi.c @@ -303,7 +303,7 @@ static int hb_cdpMultiWeight( PHB_CODEPAGE cdp, const char * szChar ) ( szChar[ 1 ] == pmulti->cLast[ 0 ] || szChar[ 1 ] == pmulti->cLast[ 1 ] ) ) { - return ( szChar[ 0 ] == pmulti->cFirst[ 0 ] ) ? + return ( szChar[ 0 ] == pmulti->cFirst[ 0 ] ) ? pmulti->sortUp : pmulti->sortLo; } } @@ -1987,13 +1987,13 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, { flags[ ( HB_UCHAR ) multi->cFirst[ 0 ] ] |= HB_CDP_MULTI1; flags[ ( HB_UCHAR ) multi->cLast [ 0 ] ] |= HB_CDP_MULTI2; - multi->sortUp = ++iSortUp; + multi->sortUp = ++iSortUp - iAccUp; } if( multi->cFirst[ 1 ] != ' ' ) { flags[ ( HB_UCHAR ) multi->cFirst[ 1 ] ] |= HB_CDP_MULTI1; flags[ ( HB_UCHAR ) multi->cLast [ 1 ] ] |= HB_CDP_MULTI2; - multi->sortLo = ++iSortLo; + multi->sortLo = ++iSortLo - iAccLo; } if( *pup == '=' ) { @@ -2137,6 +2137,11 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, if( acc ) acc[ i ] += ( HB_UCHAR ) iAdd; } + for( i = 0; i < cdp->nMulti; ++i ) + { + cdp->multi[ i ].sortUp += iUp; + cdp->multi[ i ].sortLo += iUp + iLo; + } } return cdp;