diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 63b7229f64..06f673fc9d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-04-09 21:40 UTC+0300 Alexander Kresin + * include/hbdbf.h + * include/hbrddcdx.h + * include/hbrdddbf.h + * include/hbrddntx.h + * source/rdd/dbf1.c + * source/rdd/dbfcdx/dbfcdx1.c + * Byte 29 in dbf header with codepage information is added for later + implementation. Currently this allows to keep codepage byte ( before + it was cleared while header updating ). + 2003-04-09 13:40 UTC+0300 Alexander Kresin * include/hbexprb.c * At() function is now Clipper compatible ( At( "","abc" ) ) - diff --git a/harbour/include/hbdbf.h b/harbour/include/hbdbf.h index 9778c0ce1b..7ffd5b173f 100644 --- a/harbour/include/hbdbf.h +++ b/harbour/include/hbdbf.h @@ -78,7 +78,8 @@ typedef struct _DBFHEADER USHORT uiRecordLen; BYTE bReserved1[ 16 ]; BYTE bHasTags; - BYTE bReserved2[ 3 ]; + BYTE bCodePage; + BYTE bReserved2[ 2 ]; } DBFHEADER; typedef DBFHEADER * LPDBFHEADER; diff --git a/harbour/include/hbrddcdx.h b/harbour/include/hbrddcdx.h index 28862f0565..0baf0759c5 100644 --- a/harbour/include/hbrddcdx.h +++ b/harbour/include/hbrddcdx.h @@ -341,6 +341,7 @@ typedef struct _CDXAREA char * szMemoFileName; /* Name of memo file */ BOOL fHasMemo; /* WorkArea with Memo fields */ BOOL fHasTags; /* WorkArea with MDX or CDX index */ + BYTE bCodePage; BOOL fShared; /* Shared file */ BOOL fReadonly; /* Read only file */ USHORT * pFieldOffset; /* Pointer to field offset array */ diff --git a/harbour/include/hbrdddbf.h b/harbour/include/hbrdddbf.h index a4c2033014..c59cb0c08b 100644 --- a/harbour/include/hbrdddbf.h +++ b/harbour/include/hbrdddbf.h @@ -144,6 +144,7 @@ typedef struct _DBFAREA char * szMemoFileName; /* Name of memo file */ BOOL fHasMemo; /* WorkArea with Memo fields */ BOOL fHasTags; /* WorkArea with MDX or CDX index */ + BYTE bCodePage; BOOL fShared; /* Shared file */ BOOL fReadonly; /* Read only file */ USHORT * pFieldOffset; /* Pointer to field offset array */ diff --git a/harbour/include/hbrddntx.h b/harbour/include/hbrddntx.h index c37ec5936f..f93d7a6808 100644 --- a/harbour/include/hbrddntx.h +++ b/harbour/include/hbrddntx.h @@ -280,6 +280,7 @@ typedef struct _NTXAREA char * szMemoFileName; /* Name of memo file */ BOOL fHasMemo; /* WorkArea with Memo fields */ BOOL fHasTags; /* WorkArea with MDX or CDX index */ + BYTE bCodePage; BOOL fShared; /* Shared file */ BOOL fReadonly; /* Read only file */ USHORT * pFieldOffset; /* Pointer to field offset array */ diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 8bc8375e6a..d8be6b89a5 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -2543,6 +2543,7 @@ ERRCODE hb_dbfReadDBHeader( DBFAREAP pArea ) pArea->ulRecCount = dbHeader.ulRecCount; pArea->fHasMemo = ( dbHeader.bVersion == 0x83 ); pArea->fHasTags = dbHeader.bHasTags; + pArea->bCodePage = dbHeader.bCodePage; return SUCCESS; } @@ -2563,6 +2564,7 @@ ERRCODE hb_dbfWriteDBHeader( DBFAREAP pArea ) dbfHeader.bMonth = ( BYTE ) lMonth; dbfHeader.bDay = ( BYTE ) lDay; dbfHeader.bHasTags = ( BYTE ) pArea->fHasTags; + dbfHeader.bCodePage = pArea->bCodePage; /* Update record count */ if( pArea->fShared ) diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 79379d0fd6..5a884771e3 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -7469,6 +7469,7 @@ ERRCODE hb_cdxReadDBHeader( CDXAREAP pArea ) pArea->ulRecCount = dbHeader.ulRecCount; pArea->fHasMemo = ( dbHeader.bVersion == 0xF5 ); pArea->fHasTags = dbHeader.bHasTags; + pArea->bCodePage = dbHeader.bCodePage; return SUCCESS; } @@ -7490,7 +7491,7 @@ ERRCODE hb_cdxWriteDBHeader( CDXAREAP pArea ) dbfHeader.bYear = ( BYTE ) ( lYear - 1900 ); dbfHeader.bMonth = ( BYTE ) lMonth; dbfHeader.bDay = ( BYTE ) lDay; - dbfHeader.bHasTags = ( BYTE ) pArea->fHasTags; + dbfHeader.bCodePage = pArea->bCodePage; /* Update record count */ SELF_RECCOUNT( ( AREAP ) pArea, &ulRecCount );