diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3736826c2a..5051723cc7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-06-17 21:50 UTC+0300 Alexander Kresin + * source/rtl/cdpapi.c + ! Bug fixed in hb_cdpTranslate() and hb_cdpnTranslate() + * source/rdd/dbf1.c + * RDD works Ok now, if field names in dbf are in lower case ( this + may be if dbf created by other dbms ) + * source/codepage/cdprukoi.c + ! Bug fixed. + 2003-06-17 17:22 UTC+0100 Antonio Linares * source/debug/debugger.prg * source/debug/dbgwa.prg diff --git a/harbour/source/codepage/cdprukoi.c b/harbour/source/codepage/cdprukoi.c index 8ccd124e31..9764f015e4 100644 --- a/harbour/source/codepage/cdprukoi.c +++ b/harbour/source/codepage/cdprukoi.c @@ -59,7 +59,7 @@ #include "hbapicdp.h" static HB_CODEPAGE s_codepage = { "RUKOI8",32, - "áâ÷çäåöúéêë.öú.ìíîïðòóôõæèãþûýÿùøüàñ","ÁÂ×ÇÄÅÖÚÉÊË.ÖÚ.ÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ", + "áâ÷çäåöúéêëìíîïðòóôõæèãþûýÿùøüàñ","ÁÂ×ÇÄÅÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ", 0,0,0,0,NULL,NULL,NULL,NULL,0,NULL }; HB_CODEPAGE_ANNOUNCE( RUKOI8 ); diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 581653f708..3bb41cb441 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -1894,6 +1894,7 @@ ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) { pField = ( LPDBFFIELD ) ( pBuffer + uiCount * sizeof( DBFFIELD ) ); pFieldInfo.atomName = pField->bName; + hb_strUpper( pFieldInfo.atomName,11 ); pFieldInfo.uiLen = pField->bLen; pFieldInfo.uiDec = 0; switch( pField->bType ) diff --git a/harbour/source/rtl/cdpapi.c b/harbour/source/rtl/cdpapi.c index 08d544467e..5b3e50641a 100644 --- a/harbour/source/rtl/cdpapi.c +++ b/harbour/source/rtl/cdpapi.c @@ -266,13 +266,16 @@ void hb_cdpTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) if( cdpIn != cdpOut && cdpIn->nChars == cdpOut->nChars ) { + int nAddLower = (cdpIn->lLatin)? 6:0; for( ; *psz; psz++ ) { - if( ( n = (int)cdpIn->s_chars[ ((int)*psz)&255 ] ) != 0 ) + if( ( ( n = (int)cdpIn->s_chars[ ((int)*psz)&255 ] ) != 0 ) && + ( n <= cdpIn->nChars || ( n > (cdpOut->nChars+nAddLower) ) && + ( n <= (cdpOut->nChars*2+nAddLower) ) ) ) { n--; - *psz = ( n>=cdpOut->nChars )? - cdpOut->CharsLower[n-cdpOut->nChars-((cdpIn->lLatin)? 6:0)]:cdpOut->CharsUpper[n]; + *psz = ( n >= (cdpOut->nChars+nAddLower) )? + cdpOut->CharsLower[n-cdpOut->nChars-nAddLower]:cdpOut->CharsUpper[n]; } } } @@ -284,15 +287,20 @@ void hb_cdpnTranslate( char* psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, unsig unsigned int i; if( cdpIn != cdpOut && cdpIn->nChars == cdpOut->nChars ) + { + int nAddLower = (cdpIn->lLatin)? 6:0; for( i=0; is_chars[ ((int)*psz)&255 ] ) != 0 ) + if( ( ( n = (int)cdpIn->s_chars[ ((int)*psz)&255 ] ) != 0 ) && + ( n <= cdpIn->nChars || ( n > (cdpOut->nChars+nAddLower) ) && + ( n <= (cdpOut->nChars*2+nAddLower) ) ) ) { n--; - *psz = ( n>=cdpOut->nChars )? - cdpOut->CharsLower[n-cdpOut->nChars-((cdpIn->lLatin)? 6:0)]:cdpOut->CharsUpper[n]; + *psz = ( n >= (cdpOut->nChars+nAddLower) )? + cdpOut->CharsLower[n-cdpOut->nChars-nAddLower]:cdpOut->CharsUpper[n]; } } + } } int hb_cdpcmp( char* szFirst, char* szSecond, ULONG ulLen, PHB_CODEPAGE cdpage, ULONG* piCounter )