hb_strDescend don't respect HB_SetCodePage

I'm using now:

/******************************************************************************************************************************************
*  +cDescend( cValue )
*
*  Retorna un valor invertido teniendo en cuenta el collation ESMWIN.
*  Esta función se puede usar en la creación de indices parcialmente 
descendentes.
*/
FUNCTION cDescend( cValue )
    LOCAL n, nPos
    LOCAL nLen := Len( cValue )
    LOCAL cRet := Space( nLen )
    //                   1         2         3         4         5         6    
     7         8         9         1
    // 1234567     8    
901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
    STATIC cOrden := ' !"#$%&' + "'" 
+'()*+,-./:;<=>?[\...@0123456789aÁbcdeÉfghiÍjklmnÑoÓpqrstuÚÜvwxyzaábcdeéfghiíjklmnñoópqrstuúüvwxyz'

    FOR n := 1 TO nLen
       IF ( nPos := At( cValue[n], cOrden ) ) > 0
          cRet[n] := cOrden[104 - nPos]
       ELSE
          cRet[n] := 255 - cValue[n]
       ENDIF
    NEXT

RETURN cRet

I think any similar but using collations, needs to be implemented at c level, 
by the moment DESCEND function
can't be used at index :

INDEX ON Upper( Code ) + Descend( FisrtName ) TAG CodeName TO Cust01

Best regards,
Miguel Angel Marchuet

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to