diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 19af9fabac..282b322144 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-09 20:58 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * include/hbgtinfo.ch + + #define HB_GTI_CODEC 60 + + * contrib/gtqtc/gtqtc.h + * contrib/gtqtc/gtqtc.cpp + + Implemented CODEC support. + USAGE: + hb_gtInfo( HB_GTI_CODEC, "Windows-1251" ) + hb_setCodePage( "RU1251" ) + Please test as I have never used any codepage. + 2009-09-10 02:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbzlib.ch * Minor formatting. diff --git a/harbour/contrib/gtqtc/gtqtc.cpp b/harbour/contrib/gtqtc/gtqtc.cpp index c4eb36bb02..ef14542004 100644 --- a/harbour/contrib/gtqtc/gtqtc.cpp +++ b/harbour/contrib/gtqtc/gtqtc.cpp @@ -911,6 +911,12 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) switch( iType ) { + case HB_GTI_CODEC: + { + QTextCodec * codec = QTextCodec::codecForName( ( char * ) hb_itemGetCPtr( pInfo->pNewVal ) ); + QTextCodec::setCodecForCStrings( codec ); + break; + } case HB_GTI_FULLSCREEN: case HB_GTI_KBDSUPPORT: case HB_GTI_ISGRAPHIC: diff --git a/harbour/contrib/gtqtc/gtqtc.h b/harbour/contrib/gtqtc/gtqtc.h index c506b52ca9..6654813ae6 100644 --- a/harbour/contrib/gtqtc/gtqtc.h +++ b/harbour/contrib/gtqtc/gtqtc.h @@ -70,6 +70,7 @@ #include #include #include +#include #include "hbset.h" #include "hbgtcore.h" diff --git a/harbour/include/hbgtinfo.ch b/harbour/include/hbgtinfo.ch index cc55b3b392..7e6a774413 100644 --- a/harbour/include/hbgtinfo.ch +++ b/harbour/include/hbgtinfo.ch @@ -138,6 +138,8 @@ #define HB_GTI_CARGO 58 /* Storage of any user defined value */ #define HB_GTI_FONTSEL 59 /* X11 style font selecting */ +#define HB_GTI_CODEC 60 /* Instructs gtqtc to reqest for code page conversion class off Qt */ + /* Font weights */ #define HB_GTI_FONTW_THIN 1 #define HB_GTI_FONTW_NORMAL 2