Page 1 of 1
hb_CDPSELECT() crash ?
Posted: Wed May 31, 2023 12:03 am
by Jimmy
hi
i found another Mystery in DualGrid
in CONFIG.INI i use
[COUNTRY]
LangCode=DE
Codepage=DEWIN
which are used for
i can change
LangCode=EN
to check FWstring() Setting
but when set
Codepage=EN
it crash at Start with hb_out.log
Called from GDIP_IMAGEFROMFILE(0)
Called from FW_READIMAGE(1459) in .\source\function\IMGTXTIO.PRG
Called from (b)TWINDOW(602) in .\source\classes\WINDOW.PRG
Called from TDIALOG:READIMAGE(0) in .\source\classes\WINDOW.PRG
Called from TGRID:CLEARANDFILLDIR(1133) in .\TGRID.PRG
Called from TEXPLORER:FILLGRID(5183) in .\DUALGRID.PRG
Called from NOWBUILDGRID(1836) in .\DUALGRID.PRG
Called from (b)DOSPLASH(1777) in .\DUALGRID.PRG
Called from TWINDOW:ACTIVATE(1100) in .\source\classes\WINDOW.PRG
Called from DOSPLASH(1777) in .\DUALGRID.PRG
Called from (b)MAIN(903) in .\DUALGRID.PRG
Called from TWINDOW:ACTIVATE(1100) in .\source\classes\WINDOW.PRG
Called from MAIN(903) in .\DUALGRID.PRG
i don´t understand what hb_CDPSELECT() have to do with it as nothing of that CODE use Codepage, or

Re: hb_CDPSELECT() crash ?
Posted: Wed May 31, 2023 11:54 am
by nageswaragunupudi
the first parameter of this function is a string.
string conversions depend on codepage.
invalid codepage may create problems at any point.
Re: hb_CDPSELECT() crash ?
Posted: Wed May 31, 2023 11:56 am
by Antonio Linares
Dear Jimmy,
What code do you have here ?
Called from TGRID:CLEARANDFILLDIR(1133) in .\TGRID.PRG
Re: hb_CDPSELECT() crash ?
Posted: Wed May 31, 2023 12:32 pm
by karinha
Code: Select all | Expand
#Include "FiveWin.ch"
REQUEST HB_CODEPAGE_HU852
FUNCTION Main()
LOCAL cTxt := Chr( 71 ) + " > " + Chr( 144 ) + " is"
? hb_cdpSelect() // EN
? cTxt, Chr( 71 ) > Chr( 144 ) // G > É is .F.
? hb_cdpSelect( "HU852" ) // EN
? cTxt, Chr( 71 ) > Chr( 144 ) // G > É is .T.
? hb_cdpSelect( "EN" ) // HU852
? cTxt, Chr( 71 ) > Chr( 144 ) // G > É is .F.
RETURN NIL
/*
REQUEST HB_CODEPAGE_DE
REQUEST HB_CODEPAGE_DEWIN
FUNCTION Main()
LOCAL cTxt := "A" + Chr( 142 ) + "BC"
? "German CP-850 text:", cTxt
? "German Windows-1252 text:", hb_Translate( cTxt, "DE", "DEWIN" )
RETURN NIL
*/
/*
REQUEST HB_LANG_PT
REQUEST HB_LANG_RO
REQUEST HB_LANG_ES
FUNCTION Main()
HB_LANGSELECT( "pt" ) // Default language is now Portuguese
? CDOW( Date() ) // Segunda-feira
? "Old language id selected is ", HB_LANGSELECT() // PT
HB_LANGSELECT( "ro" ) // Default language is now Romanian
? CMONTH( Date() ) // Mai
? "Old language id selected is ", HB_LANGSELECT() // RO
HB_LANGSELECT( "es" ) // Default language is now Spanish
? CMONTH( Date() ) // Mayo
? CDOW( Date() ) // Lunes
RETURN NIL
*/
/*
REQUEST HB_LANG_EN
REQUEST HB_CODEPAGE_EN
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
FUNCTION Main()
Local xAux
Local aLang := { 'EN', 'PT850' }
xAux := hb_langSelect( hb_UserLang(), aLang[ 1 ] )
xAux := hb_cdpSelect( aLang[ 1 ] )
ALERT( CHR( 157 ) + ';;' + aLang[ 1 ], , 'GR+/N' )
xAux := hb_langSelect( hb_UserLang(), aLang[ 2 ] ) // .OR. HB_LANGSELECT( 'pt-BR', "PT850" )
xAux := hb_cdpSelect( aLang[ 2 ] )
ALERT( CHR( 157 ) + ';;' + aLang[ 2 ], , 'GR+/N' )
RETURN NIL
*/
Regards, saludos.
Re: hb_CDPSELECT() crash ?
Posted: Wed May 31, 2023 5:04 pm
by Jimmy
hi Antonio,
it happens in my DUALGRID App where i try to use FWstring()
the Error "seems" when use DIRECTORY() and try to find Icon of File
as i say it crash with hb_out.LOG so i don´t know "where" it crash
---
i have use Codepage only for DBF which i can change "on-fly"
when use FWstring() i can change Language-ID but why not Codepage-ID
Jimmy
p.s. i have send Source of DUALGRID to Mr.Rao to show DELETED "Problem"
it should also show hb_cdpSelect() "Problem"
Re: hb_CDPSELECT() crash ?
Posted: Fri Jun 02, 2023 5:01 am
by nageswaragunupudi
p.s. i have send Source of DUALGRID to Mr.Rao to show DELETED "Problem"
it should also show hb_cdpSelect() "Problem"
I did not receive.
Please send to
nageswaragunupudi[at]gmail[dot]com
Re: hb_CDPSELECT() crash ?
Posted: Fri Jun 02, 2023 5:01 am
by nageswaragunupudi
p.s. i have send Source of DUALGRID to Mr.Rao to show DELETED "Problem"
it should also show hb_cdpSelect() "Problem"
I did not receive.
Please send to
nageswaragunupudi[at]gmail[dot]com
Re: hb_CDPSELECT() crash ?
Posted: Fri Jun 02, 2023 5:06 am
by nageswaragunupudi
Can you copy and paste here the name of the file you got the problem?
Re: hb_CDPSELECT() crash ?
Posted: Wed Jun 07, 2023 3:59 pm
by Jimmy
hi,
nageswaragunupudi wrote:Can you copy and paste here the name of the file you got the problem?
did you receive DG_RAO.ZIP
Files are "read" with DIRECTORY() so i can´t specify which Files make Problem.
btw. i always try NOT to use German "Umlaute" which may make Problem