topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
not ISOEM() ISANSI() or IsUTF8() | hi,
try this CODE and use your "UMLOEM.DBF"
[code=fw:1b5bwhky]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"DBSTRUCT.CH"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"DrXlsx.ch"</span><br /><br />* <span style="color: #00D7D7;">#define</span> Use_OEM<br /><span style="color: #00D7D7;">#define</span> Use_UTF8_Sign<br /><br />REQUEST DBFCDX<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span> cDBF, cCodepage, cXLS <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> cLangCode := <span style="color: #ff0000;">"DE"</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> cDBF := <span style="color: #ff0000;">"TESTTYPE.DBF"</span><br /> * <span style="color: #00C800;">DEFAULT</span> cCodepage := <span style="color: #ff0000;">"DE850"</span><br /> <span style="color: #00C800;">DEFAULT</span> cCodepage := <span style="color: #ff0000;">"DEWIN"</span><br /> <span style="color: #00C800;">DEFAULT</span> cXLS := <span style="color: #ff0000;">"DBF2EX.XLSX"</span><br /><br /> SET DATE GERMAN<br /> SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">YEAR</span><span style="color: #000000;">(</span> DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">50</span><br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /> SET DECIMALS <span style="color: #0000ff;">TO</span> <span style="color: #000000;">2</span><br /><br />* hb_LangSelect<span style="color: #000000;">(</span> cLangCode <span style="color: #000000;">)</span><br />* hb_cdpSelect<span style="color: #000000;">(</span> cCodepage <span style="color: #000000;">)</span><br />* FW_SetUnicode<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /> UseDbf2Excel<span style="color: #000000;">(</span> cDBF, cCodepage, cXLS <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Function</span> UseDbf2Excel<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> xlswrite.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - <span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">FUNCTION</span> UseDbf2Excel<span style="color: #000000;">(</span> cDBF, cCodepage, cXLS <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oXlsx := TDrXlsx<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> aStruct, ii, iMax, nRow, nCol, nReccount, cText1, cText2<br /><span style="color: #00C800;">LOCAL</span> xValue, cType, nStart, nStop, nRecSec, nTime, cName, nLen<br /><span style="color: #00C800;">LOCAL</span> nOEM := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nANSI := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nELSE := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nCount := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> lDiverse := .F.<br /><span style="color: #00C800;">LOCAL</span> cFieldKDNR := <span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">LOCAL</span> nMemory<br /><span style="color: #00C800;">LOCAL</span> nEvery<br /><span style="color: #00C800;">LOCAL</span> nRecLast<br /><br /> <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">(</span> cDBF <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"need DBF"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">IF</span> FILE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBF2EX.XLSX"</span> <span style="color: #000000;">)</span><br /> FERASE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBF2EX.XLSX"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> USE <span style="color: #000000;">(</span>cDBF<span style="color: #000000;">)</span> <span style="color: #B900B9;">// CODEPAGE cCodepage EXCLUSIVE</span><br /> aStruct := DBSTRUCT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> iMax := LEN<span style="color: #000000;">(</span> aStruct <span style="color: #000000;">)</span><br /> nReccount := RECCOUNT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> nEvery := INT<span style="color: #000000;">(</span> nReccount / <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><br />fwlog cDBF, nReccount, iMax<br /><br /> oXlsx:<span style="color: #000000;">CreateFile</span><span style="color: #000000;">(</span> cXLS <span style="color: #000000;">)</span><br /><br /> nRow := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">FOR</span> ii := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> nCol := ii - <span style="color: #000000;">1</span><br /> cName := aStruct<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">[</span> DBS_NAME <span style="color: #000000;">]</span><br /> nLen := aStruct<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">[</span> DBS_LEN <span style="color: #000000;">]</span> * <span style="color: #000000;">2</span><br /> cType := aStruct<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">[</span> DBS_TYPE <span style="color: #000000;">]</span><br /><br /> oXlsx:<span style="color: #000000;">SetColumnSize</span><span style="color: #000000;">(</span> nRow, nCol, nLen <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow, nCol, cName <span style="color: #000000;">)</span><br />fwlog nCol, cType, nLen, cName<br /> <span style="color: #00C800;">NEXT</span><br /><br /> nCol := <span style="color: #000000;">0</span><br /> nRow := <span style="color: #000000;">1</span><br /> nStart := SECONDS<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !EOF<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> MEMORY<span style="color: #000000;">(</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> nMemory := MEMORY<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> nMemory < <span style="color: #000000;">32000</span> <span style="color: #B900B9;">// 32 kb</span><br /> fwlog <span style="color: #ff0000;">"Memory(3)"</span>, RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, MEMORY<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">IF</span> <span style="color: #000000;">(</span> RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span> % nEvery <span style="color: #000000;">)</span> = <span style="color: #000000;">0</span><br /> nCount ++<br /> fwlog nCount, RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, MEMORY<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> ii := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">FOR</span> ii := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> xValue := FIELDGET<span style="color: #000000;">(</span> ii <span style="color: #000000;">)</span><br /> cName := TRIM<span style="color: #000000;">(</span> aStruct<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">[</span> DBS_NAME <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> cType := TRIM<span style="color: #000000;">(</span> aStruct<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">[</span> DBS_TYPE <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> nCol := ii - <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> cType = <span style="color: #ff0000;">"C"</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> ISOEM<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /> nOEM ++<br /> <span style="color: #B900B9;">// fwlog "ISOEM"</span><br /> cText1 := Umlaute<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /> cText2 := CheckValue<span style="color: #000000;">(</span> cText1 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cText1 <span style="color: #000000;">)</span> .AND. !EMPTY<span style="color: #000000;">(</span> cText2 <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow, nCol, cText2 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">CASE</span> ISANSI<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /> nANSI ++<br /> <span style="color: #B900B9;">// fwlog "ISANSI"</span><br /> cText1 := Umlaute<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /> cText2 := CheckValue<span style="color: #000000;">(</span> cText1 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cText1 <span style="color: #000000;">)</span> .AND. !EMPTY<span style="color: #000000;">(</span> cText2 <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow, nCol, cText2 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">CASE</span> IsUTF8<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /> fwlog <span style="color: #ff0000;">"IsUTF8"</span><br /> oXlsx:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow, nCol, xValue <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">OTHERWISE</span><br /> <span style="color: #B900B9;">// fwlog "ELSE", xValue</span><br /> nELSE ++<br /> oXlsx:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> nRow, nCol, xValue <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDCASE</span><br /><br /> <span style="color: #00C800;">CASE</span> cType = <span style="color: #ff0000;">"M"</span><br />#ifdef Use_Memo<br /> cText1 := Umlaute<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /> cText2 := CheckValue<span style="color: #000000;">(</span> cText1 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cText2 <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #000000;">WriteString</span><span style="color: #000000;">(</span> nRow, nCol, cText2 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br />#endif<br /> <span style="color: #00C800;">CASE</span> cType = <span style="color: #ff0000;">"N"</span><br /> oXlsx:<span style="color: #000000;">WriteNumber</span><span style="color: #000000;">(</span> nRow, nCol, xValue <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> cType = <span style="color: #ff0000;">"D"</span><br /> oXlsx:<span style="color: #000000;">WriteDate</span><span style="color: #000000;">(</span> nRow, nCol, xValue, DRXLSX_ALIGN_CENTER, <span style="color: #ff0000;">"dd.mm.yyyy"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> cType = <span style="color: #ff0000;">"L"</span><br /> oXlsx:<span style="color: #000000;">WriteLogical</span><span style="color: #000000;">(</span> nRow, nCol, xValue, DRXLSX_ALIGN_CENTER <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// CASE cType = "DT"</span><br /> <span style="color: #B900B9;">// oXlsx:Say(nRow,nCol,"Datetime format" )</span><br /> <span style="color: #B900B9;">// CASE cType = "D+"</span><br /> <span style="color: #B900B9;">// oXlsx:Say(nRow,nCol,"Datetime" )</span><br /> <span style="color: #00C800;">ENDCASE</span><br /><br /> <span style="color: #00C800;">NEXT</span><br /> SKIP<br /> nRow ++<br /> <span style="color: #00C800;">ENDDO</span><br /><br /> oXlsx:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> nStop := SECONDS<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> nTime := <span style="color: #000000;">(</span> nStop - nStart <span style="color: #000000;">)</span><br /><br /> nRecLast := RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> nRecSec := nRecLast / nTime<br /><br />fwlog nReccount, nRecLast, nCount, nTime, nRecSec, nOEM, nANSI, nELSE<br /><br /> <span style="color: #00C800;">IF</span> USED<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> CLOSE<br /> <span style="color: #00C800;">ENDIF</span><br /><br /> MEMORY<span style="color: #000000;">(</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Function</span> Umlaute<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> xlswrite.prg <span style="color: #000000;">)</span> <span style="color: #000000;">4</span> - <span style="color: #00C800;">function</span> usedbf2excel<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">FUNCTION</span> Umlaute<span style="color: #000000;">(</span> cIn, nNo <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cText := TRIM<span style="color: #000000;">(</span> cIn <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cTest1, cTest2<br /><br /> cTest1 := UTF16toUTF8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> UML_OEMTOANSI<span style="color: #000000;">(</span> cText <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br />#ifdef Use_UTF8_Sign<br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">228</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ä"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">246</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ö"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">252</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ü"</span> <span style="color: #000000;">)</span><br /><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">196</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ä"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">214</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ö"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">220</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ü"</span> <span style="color: #000000;">)</span><br /><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">223</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ß"</span> <span style="color: #000000;">)</span><br />#endif<br /><br />cTest2 := cText<br /><br />#ifdef Use_OEM<br /> <span style="color: #B900B9;">// OEM</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">132</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ä"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">148</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ö"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">129</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ü"</span> <span style="color: #000000;">)</span><br /><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">142</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ä"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">153</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ö"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">154</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ü"</span> <span style="color: #000000;">)</span><br /><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">225</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ß"</span> <span style="color: #000000;">)</span><br />#endif<br /><br />fwlog cText, cTest1, cTest2, cTest1 == cTest2<br /><br /><span style="color: #00C800;">RETURN</span> cText<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Function</span> CheckValue<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> xlswrite.prg <span style="color: #000000;">)</span> <span style="color: #000000;">4</span> - <span style="color: #00C800;">function</span> usedbf2excel<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">FUNCTION</span> CheckValue<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> lNoCheck := .F.<br /><span style="color: #00C800;">LOCAL</span> cRet := <span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">LOCAL</span> aSign := <span style="color: #ff0000;">"abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+/.,:;!$%&/()=?#"</span><br /><span style="color: #00C800;">LOCAL</span> cSign, ii, iMax, cLine := TRIM<span style="color: #000000;">(</span> xValue <span style="color: #000000;">)</span><br /><br />#ifdef Use_UTF8_Sign<br /> aSign += <span style="color: #ff0000;">"äöüÄÖÜß"</span><br />#endif<br /> aSign += CHR<span style="color: #000000;">(</span> <span style="color: #000000;">34</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> lNoCheck = .T.<br /> cRet := cLine<br /> <span style="color: #00C800;">ELSE</span><br /> iMax := LEN<span style="color: #000000;">(</span> cLine <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">FOR</span> ii := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> cSign := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span> cLine, ii, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// IF AT(cSign,cLine) > 0</span><br /> <span style="color: #00C800;">IF</span> cSign $ aSign<br /> cRet += cSign<br /> <span style="color: #00C800;">ELSE</span><br />fwlog cSign, <span style="color: #0000ff;">ASC</span><span style="color: #000000;">(</span> cSign <span style="color: #000000;">)</span>, cRet<br /> cRet := <span style="color: #ff0000;">""</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> cRet<br /> </div>[/code:1b5bwhky]
save as UTF8 Format |
not ISOEM() ISANSI() or IsUTF8() | [quote:1ckdmlh0]YES this "seems" to work, no Error in LOG <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
but when try to open Excel Sheet i got Warning and all Type "C" are empty ... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
[/quote:1ckdmlh0]
This is the test I made.
[code=fw:1ckdmlh0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cOemHex := <span style="color: #ff0000;">"8494818E999AE1"</span><br /> <span style="color: #00C800;">local</span> cOemText, c, oXlsx<br /> <span style="color: #00C800;">local</span> cFileXls := <span style="color: #ff0000;">"UMLDRXL.XLSX"</span><br /><br /> cOemText := HEXTOSTR<span style="color: #000000;">(</span> cOemHex <span style="color: #000000;">)</span><br /><br /> oXlsx := TDrXlsx<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> WITH OBJECT oXlsx<br /> :<span style="color: #000000;">CreateFile</span><span style="color: #000000;">(</span> cFileXls <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColumnSize</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">80</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">WriteString</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, Utf16toUtf8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> UML_OemToAnsi<span style="color: #000000;">(</span> cOemText <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> c := <span style="color: #ff0000;">"abcd"</span> + <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> cOemText, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"pqr"</span> + <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> cOemText, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"xyz"</span><br /> :<span style="color: #000000;">WriteString</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span>, Utf16toUtf8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> UML_OemToAnsi<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> :<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> ShellExecute<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"Open"</span>, cFileXls <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> UML_OEMTOANSI <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br />unsigned char achar<span style="color: #000000;">[</span><span style="color: #000000;">]</span> = <span style="color: #000000;">{</span><br /><span style="color: #000000;">0</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span>,<span style="color: #000000;">7</span>,<span style="color: #000000;">8</span>,<span style="color: #000000;">9</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">11</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">13</span>,<span style="color: #000000;">14</span>,<span style="color: #000000;">15</span>,<span style="color: #000000;">16</span>,<span style="color: #000000;">17</span>,<span style="color: #000000;">18</span>,<span style="color: #000000;">19</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">21</span>,<span style="color: #000000;">22</span>,<span style="color: #000000;">23</span>,<span style="color: #000000;">24</span>,<span style="color: #000000;">25</span>,<span style="color: #000000;">26</span>,<span style="color: #000000;">27</span>,<span style="color: #000000;">28</span>,<br /><span style="color: #000000;">29</span>,<span style="color: #000000;">30</span>,<span style="color: #000000;">31</span>,<span style="color: #000000;">32</span>,<span style="color: #000000;">33</span>,<span style="color: #000000;">34</span>,<span style="color: #000000;">35</span>,<span style="color: #000000;">36</span>,<span style="color: #000000;">37</span>,<span style="color: #000000;">38</span>,<span style="color: #000000;">39</span>,<span style="color: #000000;">40</span>,<span style="color: #000000;">41</span>,<span style="color: #000000;">42</span>,<span style="color: #000000;">43</span>,<span style="color: #000000;">44</span>,<span style="color: #000000;">45</span>,<span style="color: #000000;">46</span>,<span style="color: #000000;">47</span>,<span style="color: #000000;">48</span>,<span style="color: #000000;">49</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">52</span>,<span style="color: #000000;">53</span>,<br /><span style="color: #000000;">54</span>,<span style="color: #000000;">55</span>,<span style="color: #000000;">56</span>,<span style="color: #000000;">57</span>,<span style="color: #000000;">58</span>,<span style="color: #000000;">59</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">61</span>,<span style="color: #000000;">62</span>,<span style="color: #000000;">63</span>,<span style="color: #000000;">64</span>,<span style="color: #000000;">65</span>,<span style="color: #000000;">66</span>,<span style="color: #000000;">67</span>,<span style="color: #000000;">68</span>,<span style="color: #000000;">69</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">71</span>,<span style="color: #000000;">72</span>,<span style="color: #000000;">73</span>,<span style="color: #000000;">74</span>,<span style="color: #000000;">75</span>,<span style="color: #000000;">76</span>,<span style="color: #000000;">77</span>,<span style="color: #000000;">78</span>,<br /><span style="color: #000000;">79</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">81</span>,<span style="color: #000000;">82</span>,<span style="color: #000000;">83</span>,<span style="color: #000000;">84</span>,<span style="color: #000000;">85</span>,<span style="color: #000000;">86</span>,<span style="color: #000000;">87</span>,<span style="color: #000000;">88</span>,<span style="color: #000000;">89</span>,<span style="color: #000000;">90</span>,<span style="color: #000000;">91</span>,<span style="color: #000000;">92</span>,<span style="color: #000000;">93</span>,<span style="color: #000000;">94</span>,<span style="color: #000000;">95</span>,<span style="color: #000000;">96</span>,<span style="color: #000000;">97</span>,<span style="color: #000000;">98</span>,<span style="color: #000000;">99</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">101</span>,<span style="color: #000000;">102</span>,<br /><span style="color: #000000;">103</span>,<span style="color: #000000;">104</span>,<span style="color: #000000;">105</span>,<span style="color: #000000;">106</span>,<span style="color: #000000;">107</span>,<span style="color: #000000;">108</span>,<span style="color: #000000;">109</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">111</span>,<span style="color: #000000;">112</span>,<span style="color: #000000;">113</span>,<span style="color: #000000;">114</span>,<span style="color: #000000;">115</span>,<span style="color: #000000;">116</span>,<span style="color: #000000;">117</span>,<span style="color: #000000;">118</span>,<span style="color: #000000;">119</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">121</span>,<br /><span style="color: #000000;">122</span>,<span style="color: #000000;">123</span>,<span style="color: #000000;">124</span>,<span style="color: #000000;">125</span>,<span style="color: #000000;">126</span>,<span style="color: #000000;">127</span>,<span style="color: #000000;">128</span>,<span style="color: #000000;">252</span>,<span style="color: #000000;">130</span>,<span style="color: #000000;">131</span>,<span style="color: #000000;">228</span>,<span style="color: #000000;">133</span>,<span style="color: #000000;">134</span>,<span style="color: #000000;">135</span>,<span style="color: #000000;">136</span>,<span style="color: #000000;">137</span>,<span style="color: #000000;">138</span>,<span style="color: #000000;">139</span>,<span style="color: #000000;">140</span>,<br /><span style="color: #000000;">141</span>,<span style="color: #000000;">196</span>,<span style="color: #000000;">143</span>,<span style="color: #000000;">144</span>,<span style="color: #000000;">145</span>,<span style="color: #000000;">146</span>,<span style="color: #000000;">147</span>,<span style="color: #000000;">246</span>,<span style="color: #000000;">149</span>,<span style="color: #000000;">150</span>,<span style="color: #000000;">151</span>,<span style="color: #000000;">152</span>,<span style="color: #000000;">214</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">155</span>,<span style="color: #000000;">156</span>,<span style="color: #000000;">157</span>,<span style="color: #000000;">158</span>,<span style="color: #000000;">159</span>,<br /><span style="color: #000000;">160</span>,<span style="color: #000000;">161</span>,<span style="color: #000000;">162</span>,<span style="color: #000000;">163</span>,<span style="color: #000000;">164</span>,<span style="color: #000000;">165</span>,<span style="color: #000000;">166</span>,<span style="color: #000000;">167</span>,<span style="color: #000000;">168</span>,<span style="color: #000000;">169</span>,<span style="color: #000000;">170</span>,<span style="color: #000000;">171</span>,<span style="color: #000000;">172</span>,<span style="color: #000000;">173</span>,<span style="color: #000000;">174</span>,<span style="color: #000000;">175</span>,<span style="color: #000000;">176</span>,<span style="color: #000000;">177</span>,<span style="color: #000000;">178</span>,<br /><span style="color: #000000;">179</span>,<span style="color: #000000;">180</span>,<span style="color: #000000;">181</span>,<span style="color: #000000;">182</span>,<span style="color: #000000;">183</span>,<span style="color: #000000;">184</span>,<span style="color: #000000;">185</span>,<span style="color: #000000;">186</span>,<span style="color: #000000;">187</span>,<span style="color: #000000;">188</span>,<span style="color: #000000;">189</span>,<span style="color: #000000;">190</span>,<span style="color: #000000;">191</span>,<span style="color: #000000;">192</span>,<span style="color: #000000;">193</span>,<span style="color: #000000;">194</span>,<span style="color: #000000;">195</span>,<span style="color: #000000;">196</span>,<span style="color: #000000;">197</span>,<br /><span style="color: #000000;">198</span>,<span style="color: #000000;">199</span>,<span style="color: #000000;">200</span>,<span style="color: #000000;">201</span>,<span style="color: #000000;">202</span>,<span style="color: #000000;">203</span>,<span style="color: #000000;">204</span>,<span style="color: #000000;">205</span>,<span style="color: #000000;">206</span>,<span style="color: #000000;">207</span>,<span style="color: #000000;">208</span>,<span style="color: #000000;">209</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">211</span>,<span style="color: #000000;">212</span>,<span style="color: #000000;">213</span>,<span style="color: #000000;">214</span>,<span style="color: #000000;">215</span>,<span style="color: #000000;">216</span>,<br /><span style="color: #000000;">217</span>,<span style="color: #000000;">218</span>,<span style="color: #000000;">219</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">221</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">223</span>,<span style="color: #000000;">224</span>,<span style="color: #000000;">223</span>,<span style="color: #000000;">226</span>,<span style="color: #000000;">227</span>,<span style="color: #000000;">228</span>,<span style="color: #000000;">229</span>,<span style="color: #000000;">230</span>,<span style="color: #000000;">231</span>,<span style="color: #000000;">232</span>,<span style="color: #000000;">233</span>,<span style="color: #000000;">234</span>,<span style="color: #000000;">235</span>,<br /><span style="color: #000000;">236</span>,<span style="color: #000000;">237</span>,<span style="color: #000000;">238</span>,<span style="color: #000000;">239</span>,<span style="color: #000000;">240</span>,<span style="color: #000000;">241</span>,<span style="color: #000000;">242</span>,<span style="color: #000000;">243</span>,<span style="color: #000000;">244</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">246</span>,<span style="color: #000000;">247</span>,<span style="color: #000000;">248</span>,<span style="color: #000000;">249</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">251</span>,<span style="color: #000000;">252</span>,<span style="color: #000000;">253</span>,<span style="color: #000000;">254</span>,<br /><span style="color: #000000;">255</span> <span style="color: #000000;">}</span>;<br /><br /> char * pText = <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> int iLen = hb_parclen<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> int i;<br /> unsigned char c;<br /><br /> <span style="color: #00C800;">for</span> <span style="color: #000000;">(</span> i = <span style="color: #000000;">0</span>; i < iLen; i++ <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> c = pText<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span>;<br /> pText<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> = achar<span style="color: #000000;">[</span> c <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">}</span><br /><br /> hb_retc<span style="color: #000000;">(</span> pText <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:1ckdmlh0]
[url=https://imageshack.com/i/pmHEVmrJp:1ckdmlh0][img:1ckdmlh0]https://imagizer.imageshack.com/v2/xq70/922/HEVmrJ.png[/img:1ckdmlh0][/url:1ckdmlh0]
If you run this test as it is you will also see that these conversions work well with Drxlsx as well as Excel.
When you use these functions directly on your DBF, it fails. That should be expected.
Reason:
As I said earlier, converting only the 7 umlaut characters is NOT enough at all.
This kind of conversion, we need to do for all accented characters of German language.
That is the reason I requested you to prepare a list of all such characters and provide us and then we will work out a correct conversion function.
The only foreign language I know is English whose characters are the same in OEM, ANSI and UTF8.
Because I do not know German, we need your help. |
not ISOEM() ISANSI() or IsUTF8() | hi,
[quote="nageswaragunupudi":18lvcu9t]When you use these functions directly on your DBF, it fails. That should be expected.
Reason:
As I said earlier, converting only the 7 umlaut characters is NOT enough at all.
This kind of conversion, we need to do for all accented characters of German language.
That is the reason I requested you to prepare a list of all such characters and provide us and then we will work out a correct conversion function.
The only foreign language I know is English whose characters are the same in OEM, ANSI and UTF8.
Because I do not know German, we need your help.[/quote:18lvcu9t]
i do not understand which Sign you mean with Accent <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> do you mean Sign > CHR(128) <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
---
when look at last Sample i do compare both Sting where Test1 == Test2
but
[code=fw:18lvcu9t]<div class="fw" id="{CB}" style="font-family: monospace;"> Test1 := Utf16toUtf8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> UML_OemToAnsi<span style="color: #000000;">(</span> cOemText <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:18lvcu9t]
fail while
[code=fw:18lvcu9t]<div class="fw" id="{CB}" style="font-family: monospace;"> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">228</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ä"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">246</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ö"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">252</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ü"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">196</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ä"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">214</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ö"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">220</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Ü"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, CHR<span style="color: #000000;">(</span> <span style="color: #000000;">223</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ß"</span> <span style="color: #000000;">)</span><br /><br /> cTest2 := cText</div>[/code:18lvcu9t]
WORK
[quote:18lvcu9t]cText = "ääääääääää" cTest1 = "ääääääääää" cTest2 = "ääääääääää" cTest1 == cTest2 = .T.
cText = "öööööööööö" cTest1 = "öööööööööö" cTest2 = "öööööööööö" cTest1 == cTest2 = .T.
cText = "üüüüüüüüüü" cTest1 = "üüüüüüüüüü" cTest2 = "üüüüüüüüüü" cTest1 == cTest2 = .T.
cText = "ÄÄÄÄÄÄÄÄÄ" cTest1 = "ÄÄÄÄÄÄÄÄÄ" cTest2 = "ÄÄÄÄÄÄÄÄÄ" cTest1 == cTest2 = .T.
cText = "ÖÖÖÖÖÖÖÖÖÖ" cTest1 = "ÖÖÖÖÖÖÖÖÖÖ" cTest2 = "ÖÖÖÖÖÖÖÖÖÖ" cTest1 == cTest2 = .T.
cText = "ÜÜÜÜÜÜÜÜÜÜ" cTest1 = "ÜÜÜÜÜÜÜÜÜÜ" cTest2 = "ÜÜÜÜÜÜÜÜÜÜ" cTest1 == cTest2 = .T.
cText = "ßßßßßßßßßß" cTest1 = "ßßßßßßßßßß" cTest2 = "ßßßßßßßßßß" cTest1 == cTest2 = .T.[/quote:18lvcu9t] |
not ISOEM() ISANSI() or IsUTF8() | hi,
here are German Sign from 32 to 255
[quote:q0o6j1qj]STRTOHEX( cSign ) = "20" ASC( cSign ) = 32
STRTOHEX( cSign ) = "21" ASC( cSign ) = 33
STRTOHEX( cSign ) = "22" ASC( cSign ) = 34
STRTOHEX( cSign ) = "23" ASC( cSign ) = 35
STRTOHEX( cSign ) = "24" ASC( cSign ) = 36
STRTOHEX( cSign ) = "25" ASC( cSign ) = 37
STRTOHEX( cSign ) = "26" ASC( cSign ) = 38
STRTOHEX( cSign ) = "27" ASC( cSign ) = 39
STRTOHEX( cSign ) = "28" ASC( cSign ) = 40
STRTOHEX( cSign ) = "29" ASC( cSign ) = 41
STRTOHEX( cSign ) = "2A" ASC( cSign ) = 42
STRTOHEX( cSign ) = "2B" ASC( cSign ) = 43
STRTOHEX( cSign ) = "2C" ASC( cSign ) = 44
STRTOHEX( cSign ) = "2D" ASC( cSign ) = 45
STRTOHEX( cSign ) = "2E" ASC( cSign ) = 46
STRTOHEX( cSign ) = "2F" ASC( cSign ) = 47
STRTOHEX( cSign ) = "30" ASC( cSign ) = 48
STRTOHEX( cSign ) = "31" ASC( cSign ) = 49
STRTOHEX( cSign ) = "32" ASC( cSign ) = 50
STRTOHEX( cSign ) = "33" ASC( cSign ) = 51
STRTOHEX( cSign ) = "34" ASC( cSign ) = 52
STRTOHEX( cSign ) = "35" ASC( cSign ) = 53
STRTOHEX( cSign ) = "36" ASC( cSign ) = 54
STRTOHEX( cSign ) = "37" ASC( cSign ) = 55
STRTOHEX( cSign ) = "38" ASC( cSign ) = 56
STRTOHEX( cSign ) = "39" ASC( cSign ) = 57
STRTOHEX( cSign ) = "3A" ASC( cSign ) = 58
STRTOHEX( cSign ) = "3B" ASC( cSign ) = 59
STRTOHEX( cSign ) = "3C" ASC( cSign ) = 60
STRTOHEX( cSign ) = "3D" ASC( cSign ) = 61
STRTOHEX( cSign ) = "3E" ASC( cSign ) = 62
STRTOHEX( cSign ) = "3F" ASC( cSign ) = 63
STRTOHEX( cSign ) = "40" ASC( cSign ) = 64
STRTOHEX( cSign ) = "41" ASC( cSign ) = 65
STRTOHEX( cSign ) = "42" ASC( cSign ) = 66
STRTOHEX( cSign ) = "43" ASC( cSign ) = 67
STRTOHEX( cSign ) = "44" ASC( cSign ) = 68
STRTOHEX( cSign ) = "45" ASC( cSign ) = 69
STRTOHEX( cSign ) = "46" ASC( cSign ) = 70
STRTOHEX( cSign ) = "47" ASC( cSign ) = 71
STRTOHEX( cSign ) = "48" ASC( cSign ) = 72
STRTOHEX( cSign ) = "49" ASC( cSign ) = 73
STRTOHEX( cSign ) = "4A" ASC( cSign ) = 74
STRTOHEX( cSign ) = "4B" ASC( cSign ) = 75
STRTOHEX( cSign ) = "4C" ASC( cSign ) = 76
STRTOHEX( cSign ) = "4D" ASC( cSign ) = 77
STRTOHEX( cSign ) = "4E" ASC( cSign ) = 78
STRTOHEX( cSign ) = "4F" ASC( cSign ) = 79
STRTOHEX( cSign ) = "50" ASC( cSign ) = 80
STRTOHEX( cSign ) = "51" ASC( cSign ) = 81
STRTOHEX( cSign ) = "52" ASC( cSign ) = 82
STRTOHEX( cSign ) = "53" ASC( cSign ) = 83
STRTOHEX( cSign ) = "54" ASC( cSign ) = 84
STRTOHEX( cSign ) = "55" ASC( cSign ) = 85
STRTOHEX( cSign ) = "56" ASC( cSign ) = 86
STRTOHEX( cSign ) = "57" ASC( cSign ) = 87
STRTOHEX( cSign ) = "58" ASC( cSign ) = 88
STRTOHEX( cSign ) = "59" ASC( cSign ) = 89
STRTOHEX( cSign ) = "5A" ASC( cSign ) = 90
STRTOHEX( cSign ) = "5B" ASC( cSign ) = 91
STRTOHEX( cSign ) = "5C" ASC( cSign ) = 92
STRTOHEX( cSign ) = "5D" ASC( cSign ) = 93
STRTOHEX( cSign ) = "5E" ASC( cSign ) = 94
STRTOHEX( cSign ) = "5F" ASC( cSign ) = 95
STRTOHEX( cSign ) = "60" ASC( cSign ) = 96
STRTOHEX( cSign ) = "61" ASC( cSign ) = 97
STRTOHEX( cSign ) = "62" ASC( cSign ) = 98
STRTOHEX( cSign ) = "63" ASC( cSign ) = 99
STRTOHEX( cSign ) = "64" ASC( cSign ) = 100
STRTOHEX( cSign ) = "65" ASC( cSign ) = 101
STRTOHEX( cSign ) = "66" ASC( cSign ) = 102
STRTOHEX( cSign ) = "67" ASC( cSign ) = 103
STRTOHEX( cSign ) = "68" ASC( cSign ) = 104
STRTOHEX( cSign ) = "69" ASC( cSign ) = 105
STRTOHEX( cSign ) = "6A" ASC( cSign ) = 106
STRTOHEX( cSign ) = "6B" ASC( cSign ) = 107
STRTOHEX( cSign ) = "6C" ASC( cSign ) = 108
STRTOHEX( cSign ) = "6D" ASC( cSign ) = 109
STRTOHEX( cSign ) = "6E" ASC( cSign ) = 110
STRTOHEX( cSign ) = "6F" ASC( cSign ) = 111
STRTOHEX( cSign ) = "70" ASC( cSign ) = 112
STRTOHEX( cSign ) = "71" ASC( cSign ) = 113
STRTOHEX( cSign ) = "72" ASC( cSign ) = 114
STRTOHEX( cSign ) = "73" ASC( cSign ) = 115
STRTOHEX( cSign ) = "74" ASC( cSign ) = 116
STRTOHEX( cSign ) = "75" ASC( cSign ) = 117
STRTOHEX( cSign ) = "76" ASC( cSign ) = 118
STRTOHEX( cSign ) = "77" ASC( cSign ) = 119
STRTOHEX( cSign ) = "78" ASC( cSign ) = 120
STRTOHEX( cSign ) = "79" ASC( cSign ) = 121
STRTOHEX( cSign ) = "7A" ASC( cSign ) = 122
STRTOHEX( cSign ) = "7B" ASC( cSign ) = 123
STRTOHEX( cSign ) = "7C" ASC( cSign ) = 124
STRTOHEX( cSign ) = "7D" ASC( cSign ) = 125
STRTOHEX( cSign ) = "7E" ASC( cSign ) = 126
STRTOHEX( cSign ) = "7F" ASC( cSign ) = 127
STRTOHEX( cSign ) = "80" ASC( cSign ) = 128
STRTOHEX( cSign ) = "81" ASC( cSign ) = 129
STRTOHEX( cSign ) = "82" ASC( cSign ) = 130
STRTOHEX( cSign ) = "83" ASC( cSign ) = 131
STRTOHEX( cSign ) = "84" ASC( cSign ) = 132
STRTOHEX( cSign ) = "85" ASC( cSign ) = 133
STRTOHEX( cSign ) = "86" ASC( cSign ) = 134
STRTOHEX( cSign ) = "87" ASC( cSign ) = 135
STRTOHEX( cSign ) = "88" ASC( cSign ) = 136
STRTOHEX( cSign ) = "89" ASC( cSign ) = 137
STRTOHEX( cSign ) = "8A" ASC( cSign ) = 138
STRTOHEX( cSign ) = "8B" ASC( cSign ) = 139
STRTOHEX( cSign ) = "8C" ASC( cSign ) = 140
STRTOHEX( cSign ) = "8D" ASC( cSign ) = 141
STRTOHEX( cSign ) = "8E" ASC( cSign ) = 142
STRTOHEX( cSign ) = "8F" ASC( cSign ) = 143
STRTOHEX( cSign ) = "90" ASC( cSign ) = 144
STRTOHEX( cSign ) = "91" ASC( cSign ) = 145
STRTOHEX( cSign ) = "92" ASC( cSign ) = 146
STRTOHEX( cSign ) = "93" ASC( cSign ) = 147
STRTOHEX( cSign ) = "94" ASC( cSign ) = 148
STRTOHEX( cSign ) = "95" ASC( cSign ) = 149
STRTOHEX( cSign ) = "96" ASC( cSign ) = 150
STRTOHEX( cSign ) = "97" ASC( cSign ) = 151
STRTOHEX( cSign ) = "98" ASC( cSign ) = 152
STRTOHEX( cSign ) = "99" ASC( cSign ) = 153
STRTOHEX( cSign ) = "9A" ASC( cSign ) = 154
STRTOHEX( cSign ) = "9B" ASC( cSign ) = 155
STRTOHEX( cSign ) = "9C" ASC( cSign ) = 156
STRTOHEX( cSign ) = "9D" ASC( cSign ) = 157
STRTOHEX( cSign ) = "9E" ASC( cSign ) = 158
STRTOHEX( cSign ) = "9F" ASC( cSign ) = 159
STRTOHEX( cSign ) = "A0" ASC( cSign ) = 160
STRTOHEX( cSign ) = "A1" ASC( cSign ) = 161
STRTOHEX( cSign ) = "A2" ASC( cSign ) = 162
STRTOHEX( cSign ) = "A3" ASC( cSign ) = 163
STRTOHEX( cSign ) = "A4" ASC( cSign ) = 164
STRTOHEX( cSign ) = "A5" ASC( cSign ) = 165
STRTOHEX( cSign ) = "A6" ASC( cSign ) = 166
STRTOHEX( cSign ) = "A7" ASC( cSign ) = 167
STRTOHEX( cSign ) = "A8" ASC( cSign ) = 168
STRTOHEX( cSign ) = "A9" ASC( cSign ) = 169
STRTOHEX( cSign ) = "AA" ASC( cSign ) = 170
STRTOHEX( cSign ) = "AB" ASC( cSign ) = 171
STRTOHEX( cSign ) = "AC" ASC( cSign ) = 172
STRTOHEX( cSign ) = "AD" ASC( cSign ) = 173
STRTOHEX( cSign ) = "AE" ASC( cSign ) = 174
STRTOHEX( cSign ) = "AF" ASC( cSign ) = 175
STRTOHEX( cSign ) = "B0" ASC( cSign ) = 176
STRTOHEX( cSign ) = "B1" ASC( cSign ) = 177
STRTOHEX( cSign ) = "B2" ASC( cSign ) = 178
STRTOHEX( cSign ) = "B3" ASC( cSign ) = 179
STRTOHEX( cSign ) = "B4" ASC( cSign ) = 180
STRTOHEX( cSign ) = "B5" ASC( cSign ) = 181
STRTOHEX( cSign ) = "B6" ASC( cSign ) = 182
STRTOHEX( cSign ) = "B7" ASC( cSign ) = 183
STRTOHEX( cSign ) = "B8" ASC( cSign ) = 184
STRTOHEX( cSign ) = "B9" ASC( cSign ) = 185
STRTOHEX( cSign ) = "BA" ASC( cSign ) = 186
STRTOHEX( cSign ) = "BB" ASC( cSign ) = 187
STRTOHEX( cSign ) = "BC" ASC( cSign ) = 188
STRTOHEX( cSign ) = "BD" ASC( cSign ) = 189
STRTOHEX( cSign ) = "BE" ASC( cSign ) = 190
STRTOHEX( cSign ) = "BF" ASC( cSign ) = 191
STRTOHEX( cSign ) = "C0" ASC( cSign ) = 192
STRTOHEX( cSign ) = "C1" ASC( cSign ) = 193
STRTOHEX( cSign ) = "C2" ASC( cSign ) = 194
STRTOHEX( cSign ) = "C3" ASC( cSign ) = 195
STRTOHEX( cSign ) = "C4" ASC( cSign ) = 196
STRTOHEX( cSign ) = "C5" ASC( cSign ) = 197
STRTOHEX( cSign ) = "C6" ASC( cSign ) = 198
STRTOHEX( cSign ) = "C7" ASC( cSign ) = 199
STRTOHEX( cSign ) = "C8" ASC( cSign ) = 200
STRTOHEX( cSign ) = "C9" ASC( cSign ) = 201
STRTOHEX( cSign ) = "CA" ASC( cSign ) = 202
STRTOHEX( cSign ) = "CB" ASC( cSign ) = 203
STRTOHEX( cSign ) = "CC" ASC( cSign ) = 204
STRTOHEX( cSign ) = "CD" ASC( cSign ) = 205
STRTOHEX( cSign ) = "CE" ASC( cSign ) = 206
STRTOHEX( cSign ) = "CF" ASC( cSign ) = 207
STRTOHEX( cSign ) = "D0" ASC( cSign ) = 208
STRTOHEX( cSign ) = "D1" ASC( cSign ) = 209
STRTOHEX( cSign ) = "D2" ASC( cSign ) = 210
STRTOHEX( cSign ) = "D3" ASC( cSign ) = 211
STRTOHEX( cSign ) = "D4" ASC( cSign ) = 212
STRTOHEX( cSign ) = "D5" ASC( cSign ) = 213
STRTOHEX( cSign ) = "D6" ASC( cSign ) = 214
STRTOHEX( cSign ) = "D7" ASC( cSign ) = 215
STRTOHEX( cSign ) = "D8" ASC( cSign ) = 216
STRTOHEX( cSign ) = "D9" ASC( cSign ) = 217
STRTOHEX( cSign ) = "DA" ASC( cSign ) = 218
STRTOHEX( cSign ) = "DB" ASC( cSign ) = 219
STRTOHEX( cSign ) = "DC" ASC( cSign ) = 220
STRTOHEX( cSign ) = "DD" ASC( cSign ) = 221
STRTOHEX( cSign ) = "DE" ASC( cSign ) = 222
STRTOHEX( cSign ) = "DF" ASC( cSign ) = 223
STRTOHEX( cSign ) = "E0" ASC( cSign ) = 224
STRTOHEX( cSign ) = "E1" ASC( cSign ) = 225
STRTOHEX( cSign ) = "E2" ASC( cSign ) = 226
STRTOHEX( cSign ) = "E3" ASC( cSign ) = 227
STRTOHEX( cSign ) = "E4" ASC( cSign ) = 228
STRTOHEX( cSign ) = "E5" ASC( cSign ) = 229
STRTOHEX( cSign ) = "E6" ASC( cSign ) = 230
STRTOHEX( cSign ) = "E7" ASC( cSign ) = 231
STRTOHEX( cSign ) = "E8" ASC( cSign ) = 232
STRTOHEX( cSign ) = "E9" ASC( cSign ) = 233
STRTOHEX( cSign ) = "EA" ASC( cSign ) = 234
STRTOHEX( cSign ) = "EB" ASC( cSign ) = 235
STRTOHEX( cSign ) = "EC" ASC( cSign ) = 236
STRTOHEX( cSign ) = "ED" ASC( cSign ) = 237
STRTOHEX( cSign ) = "EE" ASC( cSign ) = 238
STRTOHEX( cSign ) = "EF" ASC( cSign ) = 239
STRTOHEX( cSign ) = "F0" ASC( cSign ) = 240
STRTOHEX( cSign ) = "F1" ASC( cSign ) = 241
STRTOHEX( cSign ) = "F2" ASC( cSign ) = 242
STRTOHEX( cSign ) = "F3" ASC( cSign ) = 243
STRTOHEX( cSign ) = "F4" ASC( cSign ) = 244
STRTOHEX( cSign ) = "F5" ASC( cSign ) = 245
STRTOHEX( cSign ) = "F6" ASC( cSign ) = 246
STRTOHEX( cSign ) = "F7" ASC( cSign ) = 247
STRTOHEX( cSign ) = "F8" ASC( cSign ) = 248
STRTOHEX( cSign ) = "F9" ASC( cSign ) = 249
STRTOHEX( cSign ) = "FA" ASC( cSign ) = 250
STRTOHEX( cSign ) = "FB" ASC( cSign ) = 251
STRTOHEX( cSign ) = "FC" ASC( cSign ) = 252
STRTOHEX( cSign ) = "FD" ASC( cSign ) = 253
STRTOHEX( cSign ) = "FE" ASC( cSign ) = 254
STRTOHEX( cSign ) = "FF" ASC( cSign ) = 255 [/quote:q0o6j1qj] |
not ISOEM() ISANSI() or IsUTF8() | That is just a list from 33 to 255.
I am looking for German OEM character codes, of "characters having accent"
Its ok. Please leave it. |
not ISOEM() ISANSI() or IsUTF8() | May I ask about your oem.dbf?
1. Does this code display the text correctly or correctly in most of the cases?
[code=fw:3hgt18xr]<div class="fw" id="{CB}" style="font-family: monospace;">XBROWSER <span style="color: #ff0000;">"name.dbf"</span> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t. <span style="color: #000000;">)</span></div>[/code:3hgt18xr]
or
[code=fw:3hgt18xr]<div class="fw" id="{CB}" style="font-family: monospace;">USE <name.dbf><br />XBROWSER <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t. <span style="color: #000000;">)</span></div>[/code:3hgt18xr]
Does changing Codepages make much difference?
2. How large is the dbf? Number of records and number of fields? |
not ISOEM() ISANSI() or IsUTF8() | After doing several tests, I came to the opinion that it is not a good idea to make our functions. It is better to depend on the standard Harbour function OemToAnsi() and then later convert to Utf8 if necessary. |
not ISOEM() ISANSI() or IsUTF8() | hi,
[quote="nageswaragunupudi":13ofcjoq]May I ask about your oem.dbf?[/quote:13ofcjoq]
have send you a Email with Link to my Online-Web-Space where i have upload "DE_OEM.ZIP"
[quote="nageswaragunupudi":13ofcjoq]1. Does this code display the text correctly or correctly in most of the cases?
[code=fw:13ofcjoq]<div class="fw" id="{CB}" style="font-family: monospace;">XBROWSER <span style="color: #ff0000;">"name.dbf"</span> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t. <span style="color: #000000;">)</span></div>[/code:13ofcjoq]
or
[code=fw:13ofcjoq]<div class="fw" id="{CB}" style="font-family: monospace;">USE <name.dbf><br />XBROWSER <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t. <span style="color: #000000;">)</span></div>[/code:13ofcjoq][/quote:13ofcjoq]
will test it
[quote="nageswaragunupudi":13ofcjoq]Does changing Codepages make much difference?[/quote:13ofcjoq]
when Codepage is wrong German "Umlaute" does not Display / Print
it are those 7 "Umlaute" only ( German does not use "accent" Sign )
[quote="nageswaragunupudi":13ofcjoq]2. How large is the dbf? Number of records and number of fields?[/quote:13ofcjoq]
Size < 1 Kb, 255-32 Records, 1 x FIELD
RECNO() -> CHR(x) |
not ISOEM() ISANSI() or IsUTF8() | [quote:s8l97v9c]have send you a Email with Link to my Online-Web-Space where i have upload "DE_OEM.ZIP"
[/quote:s8l97v9c]
I did not receive it yet.
email:
nageswaragunupudi [@] gmail [dot] com |
not ISOEM() ISANSI() or IsUTF8() | [quote:1u7ef900]German does not use "accent" Sign[/quote:1u7ef900]
I am asking out of ignorance.
Are these not German characters?
[size=150:1u7ef900]õòóôûúùâáàãêéèÃÁÀ[/size:1u7ef900]
I typed these characters using Google Virtual Keyboard for German Language |
not ISOEM() ISANSI() or IsUTF8() | [quote:1mbjbvyq]Size < 1 Kb, 255-32 Records, 1 x FIELD
RECNO() -> CHR(x)
[/quote:1mbjbvyq]
This is the code for 255-32 records
[code=fw:1mbjbvyq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Chars33to255<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oXlsx<br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"chars33to255.xlsx"</span><br /> <span style="color: #00C800;">local</span> n,na, c, cx<br /><br /> ? <span style="color: #ff0000;">"Start"</span><br /> oXlsx := TDrXlsx<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #000000;">CreateFile</span><span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #000000;">SetColumnSize</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">8</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">for</span> n := <span style="color: #000000;">33</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">255</span><br /> oXlsx:<span style="color: #000000;">WriteNumber</span><span style="color: #000000;">(</span> n - <span style="color: #000000;">33</span>, <span style="color: #000000;">0</span>, n <span style="color: #000000;">)</span><br /> c := Chr<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> IsOem<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /> c := OemToAnsi<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> oXlsx:<span style="color: #000000;">WriteNumber</span><span style="color: #000000;">(</span> n - <span style="color: #000000;">33</span>, <span style="color: #000000;">1</span>, <span style="color: #0000ff;">ASC</span><span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> c := HB_UTF8CHR<span style="color: #000000;">(</span> <span style="color: #0000ff;">ASC</span><span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #000000;">WriteString</span><span style="color: #000000;">(</span> n - <span style="color: #000000;">33</span>, <span style="color: #000000;">2</span>, STRTOHEX<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oXlsx:<span style="color: #000000;">WriteString</span><span style="color: #000000;">(</span> n - <span style="color: #000000;">33</span>, <span style="color: #000000;">3</span>, c <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /> oXlsx:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ? <span style="color: #ff0000;">"Done"</span><br /><br /> ShellExecute<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"Open"</span>, cFile <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1mbjbvyq]
No errors. |
not ISOEM() ISANSI() or IsUTF8() | hi,
[quote="nageswaragunupudi":2huc30qs]This is the code for 255-32 records[/quote:2huc30qs]
as long Sign come not from DBF, made in OEM Environment , it is not the Problem that i mean
as i say these OEM DBF was made by Cl*pper App, using NTX, where i have OEM Sign with German "Umlaute"
as Xbase++ default use OEM it is a Problem of all Xbase++ User when want to change to Fivewin (and still use Xbase++ OEM App)
i can change CODEPAGE to DE850 for OEM-DBF to display "right" under Fivewin but it does not "change" it to UFT8 which DrXlsx need
i will try to send you OEM-DBF again
---
i have found this OT4XB CODE
[code=fw:2huc30qs]<div class="fw" id="{CB}" style="font-family: monospace;">XPPRET XPPENTRY COEMTOUTF8<span style="color: #000000;">(</span>XppParamList pl <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> ContainerHandle conr = _conNew<span style="color: #000000;">(</span>NULLCONTAINER<span style="color: #000000;">)</span>;<br /> BOOL bByRef = <span style="color: #00C800;">FALSE</span>;<br /> ContainerHandle conc = _conTParam<span style="color: #000000;">(</span> pl,<span style="color: #000000;">1</span>,&bByRef,XPP_CHARACTER<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> conc <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> ULONG nOemLen = <span style="color: #000000;">0</span>;<br /> LPSTR pOem = <span style="color: #000000;">0</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ot4xb_conRLockC<span style="color: #000000;">(</span>conc,&pOem,&nOemLen<span style="color: #000000;">)</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> LPWSTR pWide = <span style="color: #000000;">(</span>LPWSTR<span style="color: #000000;">)</span> _xgrab<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nOemLen * <span style="color: #000000;">2</span><span style="color: #000000;">)</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> int nWideLen = MultiByteToWideChar<span style="color: #000000;">(</span>CP_OEMCP,<span style="color: #000000;">0</span>,pOem,<span style="color: #000000;">(</span>int<span style="color: #000000;">)</span>nOemLen,pWide,<span style="color: #000000;">(</span>int<span style="color: #000000;">)</span><span style="color: #000000;">(</span>nOemLen<span style="color: #000000;">+1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>;<br /> int nUtf8Len = WideCharToMultiByte<span style="color: #000000;">(</span>CP_UTF8,<span style="color: #000000;">0</span>,pWide,nWideLen,<span style="color: #00C800;">NULL</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>;<br /> LPSTR pUtf8 = <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> _xgrab<span style="color: #000000;">(</span><span style="color: #000000;">(</span>UINT<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>nUtf8Len + <span style="color: #000000;">1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>;<br /> nUtf8Len = WideCharToMultiByte<span style="color: #000000;">(</span>CP_UTF8,<span style="color: #000000;">0</span>,pWide,nWideLen,pUtf8,nUtf8Len<span style="color: #000000;">+1</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>;<br /> _conPutCL<span style="color: #000000;">(</span>conr,pUtf8,<span style="color: #000000;">(</span>ULONG<span style="color: #000000;">)</span>nUtf8Len<span style="color: #000000;">)</span>;<br /> ot4xb_conUnlockC<span style="color: #000000;">(</span>conc<span style="color: #000000;">)</span>;<br /> _xfree<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>void*<span style="color: #000000;">)</span> pWide <span style="color: #000000;">)</span>; _xfree<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>void*<span style="color: #000000;">)</span> pUtf8 <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>!bByRef <span style="color: #000000;">)</span> _conRelease<span style="color: #000000;">(</span>conc<span style="color: #000000;">)</span>;<br /> conc = <span style="color: #000000;">0</span>;<br /> <span style="color: #000000;">}</span><br /> _conReturn<span style="color: #000000;">(</span>pl,conr<span style="color: #000000;">)</span>; _conRelease<span style="color: #000000;">(</span>conr<span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /> </div>[/code:2huc30qs]
[code=fw:2huc30qs]<div class="fw" id="{CB}" style="font-family: monospace;">OT4XB_API WCHAR * pAnsi2WStr<span style="color: #000000;">(</span> LPSTR pAnsi , int cb , int* pcc <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pAnsi <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>cb == <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> && pAnsi <span style="color: #000000;">)</span> cb = <span style="color: #000000;">(</span>int<span style="color: #000000;">)</span> _xstrlen<span style="color: #000000;">(</span>pAnsi<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pAnsi && cb <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> LPWSTR pWide = <span style="color: #000000;">(</span>LPWSTR<span style="color: #000000;">)</span> _xgrab<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>ULONG<span style="color: #000000;">)</span> <span style="color: #000000;">(</span><span style="color: #000000;">(</span>cb + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> * <span style="color: #000000;">2</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> int cc = MultiByteToWideChar<span style="color: #000000;">(</span>CP_ACP,MB_PRECOMPOSED,pAnsi,cb,pWide,cb<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pcc <span style="color: #000000;">)</span> pcc<span style="color: #000000;">[</span><span style="color: #000000;">0</span><span style="color: #000000;">]</span> = cc;<br /> <span style="color: #00C800;">return</span> pWide;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><span style="color: #000000;">}</span><br /> </div>[/code:2huc30qs]
[code=fw:2huc30qs]<div class="fw" id="{CB}" style="font-family: monospace;">OT4XB_API LPSTR pWStr2Ansi<span style="color: #000000;">(</span> WCHAR* pWide , int cc, int* pcc<span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pWide <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>cc == <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> && pWide <span style="color: #000000;">)</span> cc = <span style="color: #000000;">(</span>int<span style="color: #000000;">)</span> _xstrlenW<span style="color: #000000;">(</span>pWide<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pWide && cc <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> LPSTR pAnsi = <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> _xgrab<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>ULONG<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>cc + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> cc = WideCharToMultiByte<span style="color: #000000;">(</span>CP_ACP,WC_COMPOSITECHECK,pWide,cc,pAnsi,cc,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pcc <span style="color: #000000;">)</span> pcc<span style="color: #000000;">[</span><span style="color: #000000;">0</span><span style="color: #000000;">]</span> = cc;<br /> <span style="color: #00C800;">return</span> pAnsi;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><span style="color: #000000;">}</span><br /> </div>[/code:2huc30qs]
and reverse
[code=fw:2huc30qs]<div class="fw" id="{CB}" style="font-family: monospace;">XPPRET XPPENTRY CUTF8TOOEM<span style="color: #000000;">(</span>XppParamList pl <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> ContainerHandle conr = _conNew<span style="color: #000000;">(</span>NULLCONTAINER<span style="color: #000000;">)</span>;<br /> BOOL bByRef = <span style="color: #00C800;">FALSE</span>;<br /> ContainerHandle conc = _conTParam<span style="color: #000000;">(</span> pl,<span style="color: #000000;">1</span>,&bByRef,XPP_CHARACTER<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> conc <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> ULONG nUtf8Len = <span style="color: #000000;">0</span>;<br /> LPSTR pUtf8 = <span style="color: #000000;">0</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ot4xb_conRLockC<span style="color: #000000;">(</span>conc,&pUtf8,&nUtf8Len<span style="color: #000000;">)</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> LPWSTR pWide = <span style="color: #000000;">(</span>LPWSTR<span style="color: #000000;">)</span> _xgrab<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nUtf8Len * <span style="color: #000000;">2</span><span style="color: #000000;">)</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> int nWideLen = MultiByteToWideChar<span style="color: #000000;">(</span>CP_UTF8,<span style="color: #000000;">0</span>,pUtf8,<span style="color: #000000;">(</span>int<span style="color: #000000;">)</span>nUtf8Len,pWide,<span style="color: #000000;">(</span>int<span style="color: #000000;">)</span><span style="color: #000000;">(</span>nUtf8Len<span style="color: #000000;">+1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>;<br /> int nOemLen = WideCharToMultiByte<span style="color: #000000;">(</span>CP_OEMCP,<span style="color: #000000;">0</span>,pWide,nWideLen,<span style="color: #00C800;">NULL</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>;<br /> LPSTR pOem = <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> _xgrab<span style="color: #000000;">(</span><span style="color: #000000;">(</span>UINT<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>nOemLen + <span style="color: #000000;">1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>;<br /> nOemLen = WideCharToMultiByte<span style="color: #000000;">(</span>CP_OEMCP,<span style="color: #000000;">0</span>,pWide,nWideLen,pOem,nOemLen<span style="color: #000000;">+1</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>;<br /> _conPutCL<span style="color: #000000;">(</span>conr,pOem,<span style="color: #000000;">(</span>ULONG<span style="color: #000000;">)</span>nOemLen<span style="color: #000000;">)</span>;<br /> ot4xb_conUnlockC<span style="color: #000000;">(</span>conc<span style="color: #000000;">)</span>;<br /> _xfree<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>void*<span style="color: #000000;">)</span> pWide <span style="color: #000000;">)</span>; _xfree<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>void*<span style="color: #000000;">)</span> pOem <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>!bByRef <span style="color: #000000;">)</span> _conRelease<span style="color: #000000;">(</span>conc<span style="color: #000000;">)</span>;<br /> conc = <span style="color: #000000;">0</span>;<br /> <span style="color: #000000;">}</span><br /> _conReturn<span style="color: #000000;">(</span>pl,conr<span style="color: #000000;">)</span>; _conRelease<span style="color: #000000;">(</span>conr<span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span></div>[/code:2huc30qs] |
not ISOEM() ISANSI() or IsUTF8() | [quote:10ggsdk2]as i say these OEM DBF was made by Cl*pper App, using NTX, where i have OEM Sign with German "Umlaute"
as Xbase++ default use OEM it is a Problem of all Xbase++ User when want to change to Fivewin (and still use Xbase++ OEM App)
[/quote:10ggsdk2]
If you can share such a real life OEM dbf with a few thousand records, we will try to see if we can find a way to make things easier for you. |
not ISOEM() ISANSI() or IsUTF8() | [quote:fqmoodiv]as long Sign come not from DBF, made in OEM Environment , it is not the Problem that i mean
[/quote:fqmoodiv]
It works the same way even if is from oem dbf.
If you see my earlier samples, I created OEM dbf with Umlauts and showed exporting them |
not ISOEM() ISANSI() or IsUTF8() | hi,
[quote="nageswaragunupudi":2rwcpxwa]If you see my earlier samples, I created OEM dbf with Umlauts and showed exporting them[/quote:2rwcpxwa]
to say it again : i need "read" from [size=150:2rwcpxwa]existing [/size:2rwcpxwa]DBF, NOT "made" it from CODE
i talk about DBF made under Cl*pper OEM / DOS which many Xbase++ User have as OEM is default
this Way Xbase++ User have used there old Cl*pper / DOS App and Xbase++ / Windows / GUI with "same" DBF
Xbase++ does "translate" OEM <-> ANSI "automatic" ( not all Language )
---
"normal" i just need to change CODEPAGE from "DEWIN" to "DE850" to display German "Umlaute" under harbour
than also "input" under harbour is right when look using Xbase++ App
"only" DrXlsx LIB need UTF8 where German "Umlaute" fail WHEN it come from German OEM DBF
---
Sample which i used have > 350000 Records but only 0,02 % have "Umlaute"
so i have to "test" every Record / FIELD Type "C" if it have "Umlaute"
Question : did you get Email with Link to "my" DBF <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
not ISOEM() ISANSI() or IsUTF8() | [quote:jdppzgpl]
to say it again : i need "read" from existing DBF, NOT "made" it from CODE
[/quote:jdppzgpl]
Yes.
This is what we are very much interested to support you with.
We request you to please send a few thousand records from the existing dbf, instead of a created dbf (say with chr(1) to chr(255))
You may use <!-- m --><a class="postlink" href="https://wetransfer.com/">https://wetransfer.com/</a><!-- m -->. Please send the download link to me and also Mr.Antonio.
[quote:jdppzgpl]
"only" DrXlsx LIB need UTF8 where German "Umlaute" fail WHEN it come from German OEM DBF[/quote:jdppzgpl]
The version of FWH to be released, will come with an interface to DrXlsx lib. Conversion of AnsiToUtf8 is automatic.
Using FWH methods/functions like :ToExcel() or DbfToExcel() do not require the user to convert data into utf8.
What all the work a programmer needs to do is to set oBrw:lOemAnsi := .t. or oCol:lOemAnsi := .t. for the required columns and then export to Excel. All conversions will be automatically taken care by the FWH interface to DrXlsx.
Hope we can not make it easier than this.
[quote:jdppzgpl]
Sample which i used have > 350000 Records but only 0,02 % have "Umlaute"
so i have to "test" every Record / FIELD Type "C" if it have "Umlaute"
[/quote:jdppzgpl]
This is where we want to support you and request you to share a few thousand records with us. (anywhere between 5000 to 15000)
Even now, you can browse the dbf as it is by setting oBrw:lOemAnsi := .t. and the browse should dislpay the same Umlauts as you see using DBEDIT of Harbour in DOS prompt. In any case, we will have an opportunity to test if you share the data.
[quote:jdppzgpl]
Question : did you get Email with Link to "my" DBF <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
[/quote:jdppzgpl]
Yes and I will send you the Excel file.
A few points:
The 40 characters from 129 to 168 are treated as OEM and have ANSI equivalents.
There are some OEM characters like some Box characters, etc. which have NO equivaents at all in ANSI and so they can never be displayed in Windows the same way as they appear in DOS. |
not ISOEM() ISANSI() or IsUTF8() | hi,
have send you a new Email with Link |
not ISOEM() ISANSI() or IsUTF8() | [quote="Jimmy":1m88wuzk]hi,
have send you a new Email with Link[/quote:1m88wuzk]
Thanks.
This will help me to learn. |
not ISOEM() ISANSI() or IsUTF8() | Thanks again.
Here is the comparison between
1. Direct OEM view from Command Prompt using Harbour's DBEDIT.
2. FWH XBrowse of the same DBF in ANSI, just by using one flag oBrw:OemAnsi := .t.
3. Excel as exported using DrXlsx by the new FWH interface to this library
All look identical
[url=https://imageshack.com/i/pn3jG1n6p:2zsclvm8][img:2zsclvm8]https://imagizer.imageshack.com/v2/xq70/923/3jG1n6.png[/img:2zsclvm8][/url:2zsclvm8]
Conversions from OEM to ANSI and ANSI to UTF8 are all done automatically and correctly by FWH without any code written by the programmer.
Personally I checked all rows and found the translations are correct.
Browsing, editing and modifying OEM databases using FWH XBrowse.
Please do not spend time in writing your own functions. Save time for other things.
What all required is just set this flag
[code=fw:2zsclvm8]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">lOemAnsi</span> := .t.</div>[/code:2zsclvm8]
Please try this one line code to view the table:
[code=fw:2zsclvm8]<div class="fw" id="{CB}" style="font-family: monospace;">XBROWSER <span style="color: #ff0000;">"OEM_LIST.DBF"</span> FASTEDIT SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t. <span style="color: #000000;">)</span></div>[/code:2zsclvm8]
We have checked and the OEM to ANSI translations are all correct.
You can also edit, modify and save data through inline cell-edit.
Not only inline-edit, but you can click Add and Edit buttons of XBROWSER window and edit the data.
You see the strings in ANSI, edit and modify in ANSI but XBrowse saves the modifications to the DBF in OEM. You can use the same DBF with you DOS applications like DBEDIT or XBase++
Even you can simultaneously operate the table both with XBase++ and also FWH XBrowse.
I do not have XBase++, but I tried editing simultaneously with DBEDIT of Harbour from command prompt and XBrowse in FWH application.
Note:
Instead of using XBROWSER, if you build your own XBrowse,
(a) just add the setting oBrw:lOemAnsi := .t.
(b) Do not use oBrw:EditSource() but use oBrw:Edit() only.
From next version, you can use either.
When the new version FWH2309 is released, you do not need to any utf8 conversions on your own. FWH will do this conversion while using DrXlsx.
This is the program I used and this program uses the new interface with DrXlsx.
[code=fw:2zsclvm8]<div class="fw" id="{CB}" style="font-family: monospace;"> PreferDrXlsx<span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFixed <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CONSOLAS"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-20</span><br /><br /> XBROWSER <span style="color: #ff0000;">"<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\O</span>EM_LIST.DBF"</span> SHOW RECID ;<br /> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t., ;<br /> oBrw:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFixed <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFixed<br /> </div>[/code:2zsclvm8]
Just clicked on the Excel button to generate xlsx file using DrXlsx. |
not ISOEM() ISANSI() or IsUTF8() | hi,
thx for testing German "Umlaute"
i do not have Problem with XBROWSE, i do have Problem with DrXlsx LIB
[quote:1ja1h0it]When the new version FWH2309 is released, you do not need to any utf8 conversions on your own.
FWH will do this conversion while using DrXlsx.[/quote:1ja1h0it]
ok i will wait and try "your" Way from XBROWSER() |
not show the image ( win 10) | [code=fw:1ab05jrx]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">static</span> oImage<br /><br /><span style="color: #00C800;">Function</span> TestshowImg<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oCattura<br /> <span style="color: #00C800;">Local</span> nBottom := <span style="color: #000000;">33</span><br /> <span style="color: #00C800;">Local</span> nRight := <span style="color: #000000;">115</span><br /> <span style="color: #00C800;">Local</span> nWidth := <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> nHeight := nBottom * DLG_CHARPIX_H<br /> <span style="color: #00C800;">Local</span> cImgFile:= <span style="color: #ff0000;">"default.bmp"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oCattura ; <span style="color: #B900B9;">//OF oParent</span><br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"show immagine da file"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> nWidth, nHeight TRANSPARENT <span style="color: #0000ff;">PIXEL</span><br /><br /><br /> @ <span style="color: #000000;">20</span>, <span style="color: #000000;">330</span> <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">80</span> <span style="color: #0000ff;">OF</span> oCattura <span style="color: #0000ff;">PIXEL</span> NOBORDER<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oCattura <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">(</span> cImgFile <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span></div>[/code:1ab05jrx]
I not see any image on dialog ... why ? ( tried also with LoadImage() ) |
not show the image ( win 10) | Hello Silvio,
here it is working fine on Windows 10. I use 007.bmp as default.bmp.
Best regards,
Otto |
not show the image ( win 10) | I close the pc and reopen and now I see it
I dont Know what happened |
notepadd++ | Estoy tratado de utilizar notepad++ como editor pero no he podido hacer que me compile los programas dentro del editor. Utilizo extenciones .PRG .SCR como extención de programas. Alguien que lo utilize como editor de los programas que me puede ayudar a configular.
Gracias |
noticias de MM | alguine tiene noticias el master MM, deseandole lo mejor, salud, trabajo y paz.
Ánimo master donde estes !!
Paco |
notion ai notes - join the wait list now! | [url:1olba9ng]https://www.theverge.com/2022/11/16/23460904/notion-ai-notes-writing-machine-learning[/url:1olba9ng]
Join the wait list here:
[url:1olba9ng]https://www.notion.so/signup?product=ai[/url:1olba9ng]
Thanks to Felix! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
demo video, watch it!
[url:1olba9ng]https://youtu.be/FElBbgnNtVA[/url:1olba9ng] |
novato compilando dbf01 | Buenas tardes, queria pedir consejo, ya que hace unos dias me baje de la web de fivetech el fwh, el borland c++ y harbour.
Lo he instalado en el ordenador y cambiado las rutas del buildh.bat, tambien he creado dos ficheros cfg.
Hasta aqui todo correcto. Luego he pasado a probar los programas que vienen en la carpeta samples y funcionan sin problemas, salvo los que utilizan el acceso a datos y los listbox. Por ejemplo el programa dbf01 se compila y ejecuta sin problemas hasta que le pulso la opcion "browse", momento en el cual el programa da un error y se sale a la linea de comandos.
Tambien he intentado hacer un programa de pruebas con un dialogo y varios controles (says/gets,listbox con arrays,etc) todos funcionan bien, pero en cuanto intento hacer un listbox con una b.d., momento en el cual al ejecutarlo me da una serie de errores pero el programa sigue adelante, pudiendose usar el tabulador para poner el foco en los controles, pero cuando intento poner el raton sobre el listbox, aparece el siguiente error: "information argument error" varias veces y se vuelve a salir de la aplicacion.
Gracias de antemano.
<!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
novato compilando dbf01 | Apaniagua:
Bienvenido a bordo !.
Siempre que tengas algun error muestralo aquí en el foro, dificilmente te podremos apoyar sin saber a que nos enfrentamos.
Por deducción pienso que el problema esta en la ruta de las DBFs, quiero decir, no las encuentra, pues por lo que veo solo cuando las usas te tira el error, sin embargo será de más ayuda si muestras el error que te manda y no andar con especulaciones.
Saludos |
novato compilando dbf01 | Buenas noches aqui les incluyo los mensajes de error capturados.
el programa en cuestion es c:\fwh\samples\dbfo1.prg, que realiza un browse en pantalla de la base de datos "customers"
lo compilo sin problemas con buildh y no da ningun error, pero al ejecutarlo y pulsar sobre cualquier opcion del menu:
"stop error base/1081 argument error:+ from errorsys , line: 0"
He revisado los post que contuvieran ese error y en la funcion main le he incluido el siguiente codigo:
errorblock( { | o | msginfo (o:description ) } )
He vuelto a compilar sin errores, y al ejecutar el programa de nuevo y darle a cualquier opcion del menu:
"information argument error [aceptar]". le doy 3 veces a aceptar (ya que aparece 3 veces el cuadro de dialogo y despues sale el browse en pantalla con los registros, pero en cuanto intento poner el puntero del raton en el browse, vuelve a aparecer el cuado de dialogo "information argument error [aceptar]" y al pulsarle 4 veces en aceptar, se va la aplicacion.
Espero poder haber afinado en los mensajes de error para resolver el problema.
Gracias. |
novato compilando dbf01 | Otros ejemplos de la carpeta samples, como tutor02.prg, te funcionan bien ?
Comprueba como te indica Armando, que la DBF esté en donde tienes el EXE. |
novato compilando dbf01 | Buenos dias, otros ejemplos de la misma carpeta samples si funcionan perfectamente.
he comprobado con el ejemplo dbf01 que hace una instruccion "use customer", estando el dbf01.exe y el customer.dbf en la carpeta samples.
Saludos. |
novato compilando dbf01 | Buenos dias de nuevo, ademas si no encontrase la base de datos no me apareceria despues de los mensajes de error el browse con los registros (en total hay 9 registros con dos columnas "name y adresss"), asi que encontrar la encuentra, el problema es que no se porque sale ese dichoso error y luego no me deja hacer nada mas.
Saludos. |
nowait | [img:26m5vcbi]https://i.postimg.cc/pX9t0QG9/KK.png[/img:26m5vcbi]
I open dbf with tdatabase why make error ?
is it possible to use a dialog in source (and not in resource) using the [b:26m5vcbi]NOWAIT clause?[/b:26m5vcbi]
Meaning what
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont COLOR CLR_BLACK, DLG_nColorDlg
ACTIVATE DIALOG oDlg NOWAIT
RETURN (NIL) |
nowait | Hello, you must show how you are doing the OPENING of the Database, because the ERRSYSW.prg is saying that the OPEN AREA IS NOT IN USE.
Hola, debes mostrar como estas haciendo la APERTURA de la Base de Datos, porque el ERRSYSW.prg esta diciendo que el AREA ABIERTA NO ESTÁ EN USO.
And why does this DIALOGUE need to be NOWAIT?
¿Y por qué este DIÁLOGO necesita ser NOWAIT?
Regards, saludos. |
nowait | Se que no es lo que necesitas porque usas tdatabase, pero tal vez te de un hilo para seguir.
[code=fw:560lzp0i]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00C800;">static</span> oWnd<br /><span style="color: #00C800;">static</span> lEnd := .f., nArea<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />nArea := <span style="color: #000000;">0</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialogo NoWait"</span><br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Start"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">ACTION</span> StartTest<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Info"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #0000ff;">select</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Close Area"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">ACTION</span> dbclosearea<span style="color: #000000;">(</span><span style="color: #0000ff;">select</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Esto es para que de error al querer volver a ese dialogo nowait</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> StartTest<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg<br /> <span style="color: #00C800;">local</span> oBrw , n<br /> nArea ++<br /> n := nArea<br /> USE Customer <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"customer"</span>+ALLTRIM<span style="color: #000000;">(</span>STR<span style="color: #000000;">(</span>nArea<span style="color: #000000;">)</span><span style="color: #000000;">)</span> SHARED <span style="color: #00C800;">NEW</span><br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Field->State <span style="color: #0000ff;">TO</span> State<br /> SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"State"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"No Wait Customer"</span>+ALLTRIM<span style="color: #000000;">(</span>STR<span style="color: #000000;">(</span>nArea<span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">23</span>, <span style="color: #000000;">70</span> RESIZABLE<br /> @ <span style="color: #000000;">01</span>,<span style="color: #000000;">01</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ;<br /> LINES <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER ;<br /> COLUMNS <span style="color: #ff0000;">"State"</span>,<span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"First"</span> ;<br /> HEADERS <span style="color: #ff0000;">"State"</span>,<span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"First"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">70</span><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> oBrw:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span>|| dbselectarea<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">cAlias</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">(</span>Cerrar<span style="color: #000000;">(</span>n<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Cerrar<span style="color: #000000;">(</span>n<span style="color: #000000;">)</span><br />dbclosearea<span style="color: #000000;">(</span> <span style="color: #ff0000;">"customer"</span>+ALLTRIM<span style="color: #000000;">(</span>STR<span style="color: #000000;">(</span>nArea<span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">RETURN</span> .t. <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:560lzp0i]
Los xbrowse con dialogos nowait funcionan bien, pero si cerramos un area de un dialogo que esta activo, ahi obtenemos el error.
Intuyo que por ese lado viene el problema |
nowait | [quote="Silvio.Falconi":pzhljj1c][img:pzhljj1c]https://i.postimg.cc/pX9t0QG9/KK.png[/img:pzhljj1c]
I open dbf with tdatabase why make error ?
is it possible to use a dialog in source (and not in resource) using the [b:pzhljj1c]NOWAIT clause?[/b:pzhljj1c]
Meaning what
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont COLOR CLR_BLACK, DLG_nColorDlg
ACTIVATE DIALOG oDlg NOWAIT
RETURN (NIL)[/quote:pzhljj1c]
Yes.
But close the oDbf in the valid clause but not after activate command.
This works for modal dialigs ( not nowait):
[code=fw:pzhljj1c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:pzhljj1c]
But this does not work for non-midal ( NOWAIT) dialogs.
Results in the same error as above.
WRONG
[code=fw:pzhljj1c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span><br /> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:pzhljj1c]
CORRECT WAY
[code=fw:pzhljj1c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:pzhljj1c] |
nowait | thanks I resolved with Cesar |
nowait | [quote="nageswaragunupudi":1awtmkyz][quote="Silvio.Falconi":1awtmkyz][img:1awtmkyz]https://i.postimg.cc/pX9t0QG9/KK.png[/img:1awtmkyz]
WRONG
[code=fw:1awtmkyz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span><br /> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1awtmkyz]
CORRECT WAY
[code=fw:1awtmkyz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1awtmkyz][/quote:1awtmkyz][/quote:1awtmkyz]
[b:1awtmkyz]WELCOME BACK AMONG US[/b:1awtmkyz] |
nowait | So glad to see you here with us Dear Rao <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
nowait | [quote="nageswaragunupudi":2fa5zrmi][quote="Silvio.Falconi":2fa5zrmi][img:2fa5zrmi]https://i.postimg.cc/pX9t0QG9/KK.png[/img:2fa5zrmi]
CORRECT WAY
[code=fw:2fa5zrmi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2fa5zrmi][/quote:2fa5zrmi][/quote:2fa5zrmi]
Nages,
I made as you wrote me
[code=fw:2fa5zrmi]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span><br /> </div>[/code:2fa5zrmi]
but sometimes have the same error when there is only one dialog opened
it not happened with more dialog opened with same or more dbf
it happen because on xbrowse I have a small menupopup
[img:2fa5zrmi]https://i.postimg.cc/c1PfJ7mq/rrrrrrrrrrrr.png[/img:2fa5zrmi]
[code=fw:2fa5zrmi]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /> oBrw:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">{</span>|nRow,nCol| MenuContextual<span style="color: #000000;">(</span>nRow,nCol,oDlg,oBrw,oArticoli<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:2fa5zrmi]
and [b:2fa5zrmi]the function MenuContextual[/b:2fa5zrmi]
[code=fw:2fa5zrmi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> MenuContextual<span style="color: #000000;">(</span>nRow,nCol,oDlg,oBrw,oDbf <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span> <span style="color: #000000;">2015</span><br /><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"al primo record "</span> +space<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>+ CHR<span style="color: #000000;">(</span>VK_TAB<span style="color: #000000;">)</span> + <span style="color: #ff0000;">"Ctrl+Home"</span>;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mostra la lista dal primo record"</span>;<br /> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"GRID_TOP"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span>VK_HOME, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> oDbf:<span style="color: #000000;">OrdKeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"a pagina prec. "</span> +space<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>+ CHR<span style="color: #000000;">(</span>VK_TAB<span style="color: #000000;">)</span> + <span style="color: #ff0000;">"Pag. Sù"</span>;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mostra la lista della pagina precedente"</span>;<br /> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"GRID_PREVIOUS"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span>VK_PRIOR, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> oDbf:<span style="color: #000000;">OrdKeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"al precedente record "</span> +space<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>+ CHR<span style="color: #000000;">(</span>VK_TAB<span style="color: #000000;">)</span> + <span style="color: #ff0000;">"Indietro"</span>;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mostra la lista muovendosi al record precedente "</span>;<br /> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"GRID_UP"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span>VK_UP, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> oDbf:<span style="color: #000000;">OrdKeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"avanti di un record "</span> + CHR<span style="color: #000000;">(</span>VK_TAB<span style="color: #000000;">)</span> +space<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>+ <span style="color: #ff0000;">"Avanti"</span>;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mostra la lista muovendosi al record avanti"</span>;<br /> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"GRID_DOWN"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span>VK_DOWN, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> oDbf:<span style="color: #000000;">OrdKeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"a pag. avanti "</span> +space<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>+ CHR<span style="color: #000000;">(</span>VK_TAB<span style="color: #000000;">)</span> + <span style="color: #ff0000;">"Pag. Giù"</span>;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mostra la lista della pagina avanti"</span>;<br /> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"GRID_NEXT"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span>VK_NEXT, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> oDbf:<span style="color: #000000;">OrdKeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"all'ultimo record "</span> +space<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>+ CHR<span style="color: #000000;">(</span>VK_TAB<span style="color: #000000;">)</span> + <span style="color: #ff0000;">"Ctrl+End"</span>;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mostra la lista all'ultimo record"</span>;<br /> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"GRID_BOTTOM"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span>VK_END, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">WHEN</span> oDbf:<span style="color: #000000;">OrdKeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #0000ff;">OF</span> oDlg <span style="color: #00C800;">AT</span> oBrw:<span style="color: #000000;">nTop</span>+nRow, oBrw:<span style="color: #000000;">nLeft</span>+nCol<br /> <span style="color: #00C800;">return</span> oMenu</div>[/code:2fa5zrmi] |
nowait | [quote="Antonio Linares":3c0xvtzt]So glad to see you here with us Dear Rao <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:3c0xvtzt]
I'm happy for Rao recovery too! |
nowait | Thank you |
nro de instancias de un exe | Hola:
Cómo puedo evitar que un ejecutable se cargue dos o más veces en memoria?. Que solamente me permita mantener una instancia a la vez.
Gracias. |
nro de instancias de un exe | Puedes almacenar un archivo temporal en el disco de la estación (si no existe, lo creas),El cual bloqueas exclusivo cuando entras, si no te permite bloquearlo, es que ya está siendo utilizado (ya activastes una vez)
Se que es un poco primitivo, pero trabaja para mi. |
nro de instancias de un exe | [code:100ek5e9]
IF IsExeRunning(cFileName(GetModuleFileName(GetInstance()))) //cFileName(HB_ARGV(0))
MsgStop("Programa ya se está ejecutando!"+CRLF+CRLF+"Este programa no permite multiples instancias!")
QUIT
ENDIF
[/code:100ek5e9] |
nro de instancias de un exe | Saludos metaldrummer: <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Hazlo más facil, agrega estas líneas en tu codifo fuente:
Function Main()
IF IsExeRunning( cFileName( HB_ARGV(0) ) )
MsgStop( "¡¡¡ ERROR CRITICO !!!"+CRLF+CRLF+"No es posible cargar más de 1 copia del Programa en su PC "+","Mensaje del Sistema")
QUIT
ENDIF
Return nil
Probado <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> , asì no usas ninguna variable que cualquier usuario "escurridiso" pueda modificar y entrar cuantas veces quiera..
Espero te sirva.
Saludos...
I.S.C. Victor Daniel Cuatecatl Leon
Soluciones y Desarrollo de Software Empresarial
<!-- w --><a class="postlink" href="http://www.sisa.unlugar.com">www.sisa.unlugar.com</a><!-- w --> |
nro de instancias de un exe | gracias por las respuestas!!!!
funciona de mil maravillas.
Saludos
Consultas sobre ado soy todo oídos
Mil gracias nuevamente |
nserialhd question | Good morning ANtonio
I am testing nserialhd function and i have some questions
1. nserialhd("C:") does not return the same value everytime
2. nserialhd("D:") returns always a value (same value) even if there is no "D"
3. nserialhd() returns always a value (same value)
tested on windows 8 pro, windows seven home and xp
thanks for clarification
Richard
this is the code i used
[code=fw:2n8e5m6j]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"FIVEWIN.CH"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> NC := <span style="color: #000000;">0</span>, ;<br /> ND := <span style="color: #000000;">0</span>, ;<br /> NX := <span style="color: #000000;">0</span><br /><br />NC := nserialhd<span style="color: #000000;">(</span><span style="color: #ff0000;">"C:"</span><span style="color: #000000;">)</span><br />SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />ND := nserialhd<span style="color: #000000;">(</span><span style="color: #ff0000;">"D:"</span><span style="color: #000000;">)</span><br />SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />NX := nserialhd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"NC "</span> + CVALTOCHAR<span style="color: #000000;">(</span>NC<span style="color: #000000;">)</span> + CRLF + <span style="color: #ff0000;">"ND "</span> + cvaltochar<span style="color: #000000;">(</span>nD<span style="color: #000000;">)</span> + CRLF + <span style="color: #ff0000;">"NX "</span> + cvaltochar<span style="color: #000000;">(</span>nX<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> NI<br /> </div>[/code:2n8e5m6j] |
nserialhd question | Richard,
Please add a "\" at the end of the drives, i.e.:
nserialhd("C:\") |
nserialhd question | FWH uses Windows API function GetVolumeInformation() for nSerialHD():
[url:18dd3iwz]http://msdn.microsoft.com/en-us/library/windows/desktop/aa364993(v=vs.85).aspx[/url:18dd3iwz]
[quote:18dd3iwz]Parameters
lpRootPathName [in, optional]
A pointer to a string that contains the root directory of the volume to be described.
If this parameter is NULL, the root of the current directory is used. A trailing backslash is required. For example, you specify \\MyServer\MyShare as "\\MyServer\MyShare\", or the C drive as "C:\".[/quote:18dd3iwz] |
nserialhd question | thanks Antonio
I understand now
just one thing to mention
nserialhd() = nserialhd("c:\")
regards
Richard |
nserialhd question | Richard,
Yes, it is explained in the above docs:
[quote:3ef2o7y2]If this parameter is NULL, the root of the current directory is used[/quote:3ef2o7y2] |
nserialhd question | In fact, we should implement a little change, as FWH supplies C:\ by default, and we should change it to NULL. |
nserialhd() | Bentrovati <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> .........è un sacco di tempo che non ci sentiamo.
Ho la necessità di eseguire un applicativo da hd esterno e vorrei poter controllare che sia sempre quello dov'è installato il programma.
Ho provato con la funzione nserialhd(curdrive()) ma ricevo sempre l'SN del disco "C". |
nserialhd() | Prova con
[code:f488emz5]nserialhd(curdrive()+":")[/code:f488emz5]
EMG |
nserialhd() | Ciao Enrico,
grazie..............ti farò sapere.
Giovanni |
nserialhd() | Ciao,
sai se esiste qualche funzione similare a nserialhd() che mi da un identificazione unica di u HD o di un una Pendrive Usb ?
Poiche' nserialhd() varia ogni volta che formatto l'unità
Romeo/zingoni |
nserialhd() | [quote="Romeo":1tau6x4y]Ciao,
sai se esiste qualche funzione similare a nserialhd() che mi da un identificazione unica di u HD o di un una Pendrive Usb ?
Poiche' nserialhd() varia ogni volta che formatto l'unità
Romeo/zingoni[/quote:1tau6x4y]
Quizás te sirva.
[code=fw:1tau6x4y]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/* ***********************************************************************<br /> A partir d'una lletra d'un USB inicia la cerca del seu número de sèrie.<br /> -------------------------------------------------------------------- */</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GetUSBSerial<span style="color: #000000;">(</span> cDrive <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oLoc := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"wbemScripting.SwbemLocator"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oSrv := oLoc:<span style="color: #000000;">ConnectServer</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oJobs := oSrv:<span style="color: #000000;">ExecQuery</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * FROM Win32_LogicalDiskToPartition"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oJob<br /><span style="color: #00C800;">Local</span> cDriveNumber<br /><br />cDrive = Upper<span style="color: #000000;">(</span> cDrive <span style="color: #000000;">)</span><br /><span style="color: #00C800;">If</span> Len<span style="color: #000000;">(</span> cDrive <span style="color: #000000;">)</span> == <span style="color: #000000;">1</span><br /> cDrive += <span style="color: #ff0000;">":"</span><br /><span style="color: #00C800;">Endif</span><br /><span style="color: #00C800;">If</span> Len<span style="color: #000000;">(</span> cDrive <span style="color: #000000;">)</span> > <span style="color: #000000;">2</span><br /> cDrive = <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cDrive, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Endif</span><br /><br /><span style="color: #00C800;">For</span> each oJob in oJobs<br /><br /> <span style="color: #00C800;">If</span> cDrive == StrToken<span style="color: #000000;">(</span> oJob:<span style="color: #000000;">Dependent</span>, <span style="color: #000000;">2</span>, <span style="color: #ff0000;">'"'</span> <span style="color: #000000;">)</span><br /> cDriveNumber = <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> StrToken<span style="color: #000000;">(</span> StrToken<span style="color: #000000;">(</span> oJob:<span style="color: #000000;">Antecedent</span>, <span style="color: #000000;">2</span>, <span style="color: #ff0000;">'"'</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">","</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">7</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">return</span> GetSerial<span style="color: #000000;">(</span> oSrv, cDriveNumber <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Endif</span><br /><span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #ff0000;">"."</span><br /><span style="color: #B900B9;">/* *************************** */</span><br /><span style="color: #B900B9;">/* *************************** */</span><br /><br /><span style="color: #B900B9;">/* *********************************************************<br /> Cerca a partir d'una lletra d'USB el seu número de sèrie.<br /> ------------------------------------------------------ */</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GetSerial<span style="color: #000000;">(</span> oSrv, cDriveNumber <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> aDrives := oSrv:<span style="color: #000000;">ExecQuery</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * FROM Win32_DiskDrive"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oDrive, cSerial := <span style="color: #ff0000;">""</span><br /><br /><span style="color: #00C800;">For</span> each oDrive in aDrives<br /> <span style="color: #00C800;">If</span> oDrive:<span style="color: #0000ff;">Name</span> == <span style="color: #ff0000;">"<span style="color: #000000;">\\</span>.<span style="color: #000000;">\P</span>HYSICALDRIVE"</span> + cDriveNumber .and. ;<br /> oDrive:<span style="color: #000000;">InterfaceType</span> == <span style="color: #ff0000;">"USB"</span><br /><br /> cSerial = oDrive:<span style="color: #000000;">PNPDeviceID</span><br /><br /> cSerial = <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cSerial, <span style="color: #000000;">1</span>, RAt<span style="color: #000000;">(</span> <span style="color: #ff0000;">"&"</span>, cSerial <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> cSerial = <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cSerial, RAt<span style="color: #000000;">(</span> <span style="color: #ff0000;">"&"</span>, cSerial <span style="color: #000000;">)</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> <span style="color: #00C800;">At</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cSerial ) != 0<br /> cSerial = SubStr( cSerial, At( "</span>\<span style="color: #ff0000;">", cSerial ) + 1 )<br /> Endif<br /><br /> Return cSerial<br /> //Exit<br /> Endif<br />Next<br /><br />Return cSerial<br />/* *************************** */<br /></span></div>[/code:1tau6x4y] |
nserialhd() | many thanks !
Can also you help me to set a serial in USBdrive ?
example:
setserialusb("G:","123456789") ?
tks
Romeo |
nserialhd() | [quote="Romeo":17qhswu9]many thanks !
Can also you help me to set a serial in USBdrive ?
example:
setserialusb("G:","123456789") ?
tks
Romeo[/quote:17qhswu9]
I think is not posible. |
nserialhd() | tks any |
nserialhd() vs serialnumber | Hello,
What is the different between the serialnumber returned by nSerialHD() and the number returned by the dos-command
[quote:1zv3u831]wmic diskdrive get serialnumber[/quote:1zv3u831]
I'm always use nSerialHD(), but I see that the other number is also with characters, instead only numbers. |
nserialhd() vs serialnumber | Try
[code=fw:1azrn8e3]<div class="fw" id="{CB}" style="font-family: monospace;">? NUMTOHEX<span style="color: #000000;">(</span> NSERIALHD<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:1azrn8e3]
EMG |
nserialhd() vs serialnumber | Unfortunately give this also a number.
[quote="Enrico Maria Giordano":19pbcuhj]Try
[code=fw:19pbcuhj]<div class="fw" id="{CB}" style="font-family: monospace;">? NUMTOHEX<span style="color: #000000;">(</span> NSERIALHD<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:19pbcuhj]
EMG[/quote:19pbcuhj] |
nserialhd() vs serialnumber | Can I see a sample of such serial?
EMG |
nserialhd() vs serialnumber | [code=fw:bj6rfnrc]<div class="fw" id="{CB}" style="font-family: monospace;">nSerialHD<span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #000000;">410452486</span><br />NUMTOHEX<span style="color: #000000;">(</span> NSERIALHD<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> = <span style="color: #000000;">18770206</span><br />wmic diskdrive <span style="color: #0000ff;">get</span> serialnumber = S3TRNA0M316529<br /> </div>[/code:bj6rfnrc] |
nserialhd() vs serialnumber | You forgot the code. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
nserialhd() vs serialnumber | It's added now <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
[quote="Enrico Maria Giordano":176v3nbh]You forgot the code. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG[/quote:176v3nbh] |
nserialhd() vs serialnumber | nSerialHD() returns the number of the VOL command.
EMG |
nserialhd() vs serialnumber | Yes now I see. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
It's NUMTOHEX( NSERIALHD() ) that give the same result as the VOL command.
So NSERIALHD() is not the real serial-number. After re-formating it, it will be different then.
There are also utilities to change it <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> |
ntdll.dll error | I have a program that runs 24/7 to automatically update my distributed software.
At one of my client locations, sometimes it encounters a Windows error with the file [b:hip96gxg]ntdll.dll[/b:hip96gxg]. I have researched this and found this is likely caused by a defective .dll file, which is part of the windows operating system files distributed by Microsoft.
I do not distribute or knowingly interact with this file in my application.
So here is my question: [b:hip96gxg]Are there known FWH calls that would address ntdll.dll ?[/b:hip96gxg].
This is happening only at one client's location, is not consistent, and causes a Windows, rather than FWH, error. It would not be possible to write a sample that creates the problem, so I strictly want to know about possible calls to this .dll from within FWH. Also, I know that a wide variety of non-FWH programs can also get this same error message, and it has occurred for years.
Thanks for sharing your knowledge on this topic. |
ntdll.dll error | Just look at using eventvwr.msc / s and you will see the cause of the program that is giving problems.
[url:xyvrlvbq]https://www.lifewire.com/how-to-fix-ntdll-dll-errors-2624474[/url:xyvrlvbq]
Regards. |
ntdll.dll error | Tim,
You can inspect your EXE using this tool to know what DLLs/functions are used:
[url:3c5h9jxw]https://bitbucket.org/fivetech/fivewin-contributions/downloads/peinfo.exe[/url:3c5h9jxw] |
ntdll.dll error | This program use the CDXRDD, FTP services, and the xharbour ZIP routine to create an archive. In some cases it could originate emails to an SMTP server.
It does not use a displayed window, or dialogs, nor does it use buttons, or any form of browse. It's pretty basic. It queries a server, downloads some very small ( 2KB ) files, and sometimes downloads larger ( 23 MB ) files. Once per day, it creates an archive of about 150 dbf/fpt files, and stores it locally. Is has the ability to send automatic follow up emails daily, but this site does not use that capability. It sends reports to 3rd party vendors by creating XML files, then using an http transfer, but again, on this site that feature is very limited.
That is why I asked what FWH functions/classes would be making calls to ntdll.dll. That will allow me to know if any of those may be called within the routines run here.
This is the message we find on the computer when the error occurs:
[code=fw:3l7o9j5o]<div class="fw" id="{CB}" style="font-family: monospace;"><br />MLS10aus.exe has stopped working<br /> <br />Problem signature:<br /> <span style="color: #000000;">Problem</span> Event <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">APPCRASH</span><br /> Application <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">MLS10aus</span>.exe<br /> Application Version: <span style="color: #000000;">0.0</span><span style="color: #000000;">.0</span><span style="color: #000000;">.0</span><br /> Application Timestamp: 591f1993<br /> Fault Module <span style="color: #0000ff;">Name</span>: <span style="color: #000000;">ntdll</span>.dll<br /> Fault Module Version: <span style="color: #000000;">6.1</span><span style="color: #000000;">.7601</span><span style="color: #000000;">.23915</span><br /> Fault Module Timestamp: 59b94a16<br /> Exception Code: <span style="color: #000000;">c00000fd</span><br /> Exception Offset: 0002df76<br /> OS Version: <span style="color: #000000;">6.1</span><span style="color: #000000;">.7601</span><span style="color: #000000;">.2</span><span style="color: #000000;">.1</span><span style="color: #000000;">.0</span><span style="color: #000000;">.272</span><span style="color: #000000;">.7</span><br /> Locale <span style="color: #0000ff;">ID</span>: <span style="color: #000000;">1033</span><br /> Additional Information <span style="color: #000000;">1</span>: 522b<br /> Additional Information <span style="color: #000000;">2</span>: 522bb16173724810b9b4e274bbfa35e1<br /> Additional Information <span style="color: #000000;">3</span>: 05b2<br /> Additional Information <span style="color: #000000;">4</span>: 05b2bd8f22096ef6d5a203b7013091d3<br /> </div>[/code:3l7o9j5o] |
ntdll.dll error | Maybe,
[url:2i6n1tjx]https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/programs-close-faulting-module-ntdlldll/54aaaec5-2b53-4e9f-b9a7-b7889a1cd4b6?auth=1[/url:2i6n1tjx]
Regards. |
ntdll.dll error | Antonio,
Thanks for the link. I ran that utility ... and it shows absolutely no calls to the file. I suppose it gets tricky now because some other .dll could call it, and that is not tracked in the utility ...
Tim |
ntdll.dll error | I read that response from Microsoft Answers previously, along with about every other article on the web citing this problem. There are no definitive answers, but the common thread seems to focus on a corrupt .dll on the computer.
My problem is simple. The customer uses an IT company that refuses to follow my installation instructions, has done crazy stuff, and I find the performance on their installed network is the slowest I have ever seen. In fact it is slower than what we experienced under the earliest days of networking with DOS. |
ntdll.dll error | Tim
This may be a nvidia driver problem on your clients machine ..
[img:8pk9pf1o]http://i63.tinypic.com/ohlc81.jpg[/img:8pk9pf1o]
Here is the link to a thread that may help you ..
<!-- m --><a class="postlink" href="https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/programs-close-faulting-module-ntdlldll/54aaaec5-2b53-4e9f-b9a7-b7889a1cd4b6?auth=1">https://answers.microsoft.com/en-us/win ... 4b6?auth=1</a><!-- m -->
Rick Lipkin |
ntdll.dll error | Rich,
I also saw that article. The problem is the IT folks see this client as a cash cow, yet have a terrible system in place. Whenever they have problems ( which none of my other clients experience ) the IT guys will blame it on me, though I can show the client ample documentation to back up my concerns. I have a hunch the owner of the business is related to the IT company head, because he's giving them a ton of money to do the worst work I've ever seen. I suggested they get a 2nd opinion from another IT company and they won't even consider it.
The point is I have no input into the process.
Tim |
nueva IA de Google crea vídeos en alta definición | [url:emdmu93s]https://www.genbeta.com/actualidad/nueva-ia-google-genera-videos-alta-definicion-a-traves-descripcion-que-le-hagas-similar-a-dall-e-2-video[/url:emdmu93s] |
nueva idea - FiveQT | <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=28856">viewtopic.php?f=3&t=28856</a><!-- l -->
[quote:2cdgm8yn]
Hola a todos
Me gustaría considerar seriamente en portar Fivewin para que soporte la biblioteca para HbQt, pero ...
Razones detrás de esta iniciativa:
A principios del HbQt evolución, que quería un marco de aplicación probada que iría
de lado a lado y también convertirse en banco de pruebas para HbQt, y está orientado a XBase + + debido a ciertas
razones que he explicado muchas veces en otros lugares. Tuve éxito, en gran medida, pero no lo usó nadie
desde XBase + + comunidad participó y dio retroalimentación etc La iniciativa resultó ser
completamente inútil.
El segundo en esa lista de prioridades era FiveWin pero no he podido nunca conseguir el apoyo interno
ir por este camino, porque nunca he sido un usuario de FiveWin.
Dicho esto, ahora estoy convencido de que portar Fivewin hasta HbQt abordará público mucho más amplio
entonces se podría esperar debido a 1) FiveWin consume mismo compilador, 2) la comunidad es FiveWin
inmunes al GUI, y 3) la comunidad FiveWin es muy expresiva y amplia.
Pero ...
Antes de comenzar en este sentido quiero construir un consenso sobre su viabilidad.
No quiero hacer frente a la humillación de la no aceptabilidad de los esfuerzos como la única recompensa que viene
mi camino será la satisfacción de que mis esfuerzos serán de utilidad para muchos de mis compañeros Harboureans.
Por lo tanto, aquí están las dudas me enfrento, por favor, responda ...
1. ¿Tiene desarrolladores FiveWin pensarlo derecho a tener esta solución? [Muy Importante]
2. ¿La Comunidad de Fivewin quiere que esto suceda? Su apoyo en el día a día será de vital importancia. [Muy Importante]
Tengo más preguntas, pero por ahora la respuesta a por encima de dos a sentar las bases para ir configurando mi mente en esta dirección.
Exención de responsabilidad: yo no la intención de tener ningún retorno financiero de esta empresa. La única recompensa
Yo espero que usted tratará de utilizar este puerto en las aplicaciones existentes.
[/quote:2cdgm8yn] |
nueva idea - FiveQT | <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=162230#p162230">viewtopic.php?p=162230#p162230</a><!-- l --> |
nueva propiedad para folders | Antonio, Seria muy interesante el poder poner las pestañas de los folders en la parte de abajo ( lo he visto en varios programas para pocket) .
En las pantallas de 240*240 , ganariamos espacio para poder escribir datos y eso es importante .
y de paso otra cosa :
Esta previsto automatizar los dialogos para que cambien de tamaño al desplegar el teclado , o corre de nuestra cuenta ?
Saludso. y Gracias . |
nueva propiedad para folders | Hola Jose Luis,
Despues de mucho tiempo sin vacaciones, me he podido oxigenar un poco y vuelvo con ganas. (No quiero dar envidias a nadie, eh ! <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> )
Te paso un ejemplo que hice un dia que te servira de base para gestionar el teclado. A partir de aqui, lo puedes sofisticar tanto como quieras. Para no poner todo el rollo que uso yo, este ejemplo creo q te servira:
[code:oobuj04v]
/*
Programa := TestSip.prg
Autor := Carles Aubia
Fecha := 02.03.2006
Descripcion := Ejemplo sencillo de gestion de eventos
*/
#include "FWCE.ch"
#define EVENT_SIP 224
STATIC oDlg
*--------------
FUNCTION Main()
*--------------
DEFINE DIALOG oDlg TITLE "Test Sip()"
@2, 2 SAY 'Hola maco...' OF oDlg
oDlg:bSettingChange := {|uVal| PocketEvent( uVal ) }
ACTIVATE DIALOG oDlg ON INIT Dimensiona()
RETU NIL
*----------------------------------
STATIC FUNCTION PocketEvent( uVal )
*----------------------------------
DO CASE
CASE uVal == EVENT_SIP ; Dimensiona()
ENDCASE
RETU NIL
*---------------------------
STATIC FUNCTION Dimensiona()
*---------------------------
IF SipInfo()
MoveWindow( oDlg:hWnd, 28, 10, 220, 180 )
ELSE
MoveWindow( oDlg:hWnd, 28, 10, 220, 260 )
ENDIF
oDlg:Refresh()
RETU NIL
[/code:oobuj04v] |
nueva propiedad para folders | Que tal Carles ? , yo he tomado unos dias tambien , <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Había visto este comportamiento ya en tu programa ( cuando lo estuve desmenuzando para ver todas las cosas buenas que llevaba <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ) , y fué cuando se me ocurrió la idea de copiarte , por eso la pregunta de si lo debemos implementar nosotros .
He mirado , y algunos lenguajes para pocket traen este Extra "De serie"
y pense ¿ Porque nosotros vamos a ser menos... ?
Antonio ? , esta previsto ?
De todas maneras muchas gracias por el ejemplo , lo miraré y lo implementaré en mis programas a ver que tal .
Saludso.y Gracias. |
nueva propiedad para folders | Carles,
Buen ejemplo, lo vamos a incluir en los ejemplos de FWPPC con tu permiso, gracias.
Jose Luis, nosotros no podemos automatizar ese comportamiento, porque puede haber usuarios que no quieran que sus diálogos se redimensionen sólos. |
nueva propiedad para folders | De acuerdo .
De todas maneras se podria poner una propiedad lautoajust para poner si se desea o no
Carles , si el say esta fuera del area visible , realiza scroll ? , seria interesante ...
Antonio , respecto a la primera pregunta , (los folder con pestañas abajo), que nos puedes decir ? |
nueva propiedad para folders | Jose Luis,
Hay que buscar el estilo correspondiente e implementar un método que le asigne ese valor al estilo. Vamos a buscarlo. |
nueva propiedad para folders | Jose Luis,
Yo creo q tendriamos de hacer una reflexion sobre el tipo de aplicacion q hacemos. En principio, es de tipo gestion, y entraremos bastantes datos via teclado. Esto implica q nuestra pantalla la 'capamos' constantemente. A partir de aqui, q preferimos: Un sistema con scroll y buscar los datos para editar o mas bien un acceso rapido 'clicando' una solapa de un folder, un boton a otra pantalla, otra pagina.... Yo creo q este, segundo ejemplo es mas practico para el usuario.
Ahora este tipo de control de redimensionar, puede irnos bien por ejemplo en otros casos, por ejemplo un browse con un get de busqueda, en el q el browse se redimensiona cuando se activa el teclado, pero en el que el get siempre lo tenemos visible, no hace falta que lo busquemos.
[img][url=http://imageshack.us:2sguvs67][img]http://img159.imageshack.us/img159/778/dim1wl.jpg[/img][/url:2sguvs67]
No se, algo genérico, lo veo complicado. Ahora recuerdo q Antonio puso un dia un ejemplo de ventana con scroll. Se podria probar, pero yo prefiero mas la opcion de que los datos me vengan a mi y no que yo tenga de ir a los datos <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
nueva propiedad para folders | Totalmente de acuerdo, mejor los folders.
Respecto al ejemplo de scroll ,usa un say para simular el scroll , es una cosa momentanea , no definitiva , esta dentro de los pendientes de Antonio , dejemosle que nos sorprenda , pero sin prisas <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> .
El ejemplo esta en una ventana , yo intente el ejemplo en un dialogo , y no funciono , la verdad que fue un intento rapido y no investige demasiado (tenia mas trabajo ) y de todas las maneras soy muy torpe...
saludos. |
nueva versión de CodeGear 2009 | Hola:Hay una nueva versión de C++ 2009. ¿Alguien la está usando?. |
nueva versión de CodeGear 2009 | Moises,Cual es el url para su descarga ? |
nueva versión de CodeGear 2009 | Antonio:<!-- m --><a class="postlink" href="http://www.codegear.com/products/cppbuilder">http://www.codegear.com/products/cppbuilder</a><!-- m --> |
nueva versión de CodeGear 2009 | Moises,Menudo "monstruo" para instalarlo. He optado por usar una máquina virtual para que no llene el ordenador de cyber basura <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Ahora estoy intentando aislar el compilador, includes y librerías.Ya me dirás como se puede "distribuir" esto. Porque además supongo que la licencia de CodeGear no permite la redistribución... |
nueva versión de CodeGear 2009 | Sinceramente creo que lo que debemos plantearnos a corto plazo es migrar al MingW:<!-- m --><a class="postlink" href="http://es.wikipedia.org/wiki/MinGW">http://es.wikipedia.org/wiki/MinGW</a><!-- m --> |
nueva versión de Workshop | Hola,
Me gustaría saber si hay una nueva versión del Work Shop en las últimas versiones del Borland.
Muchas gracias <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> |
nuevamente sobre el RDDADO | Amigos del Foro:
Aun persiste el problema que anteriormente habia comentado, este pequeño programa :
//===========================
static function browRST()
//===========================
Public oDlg,oBrw
USE Personal1 VIA "ADORDD" TABLE "MAESTRO" MYSQL ;
FROM "Localhost" USER "root" PASSWORD "1234" ALIAS "MAESTRO"
DEFINE DIALOG oDlg FROM 1, 1 TO 25, 79
@ 1, 1 LISTBOX oBrw FIELDS MAESTRO->NUMERO, ;
MAESTRO->nombreS, ;
MAESTRO->APELLIDO1 ;
HEADERS "Codigo","Nombre ","Salario" ;
FIELDSIZES 60,200,60 ;
SIZE 284, 137 OF oDlg
@154,08 BTNBMP LEFT PROMPT " Agregar" SIZE 50,19 OF oDlg FILENAME "NEW1.BMP" ACTION oDlg:End()
@154,67 BTNBMP LEFT PROMPT " Modificar" SIZE 50,19 OF oDlg FILENAME "CARDF00C.BMP" ACTION oDlg:End()
@154,125 BTNBMP LEFT PROMPT " Borrar" SIZE 50,19 OF oDlg FILENAME "BORRAR1.BMP" //ACTION BorraU(oLbx )
@154,184 BTNBMP LEFT PROMPT " Buscar" SIZE 50,19 OF oDlg FILENAME "FIND.BMP" //ACTION BuscaU(oLbx,3,"Color")
@154,242 BTNBMP LEFT PROMPT " Salir" SIZE 50,19 OF oDlg FILENAME "SALIR3.BMP" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
CLOSE DATABASES
RETURN NIL
me envia el siguiente error :
pplication
===========
Path and name: C:\sistemas\RRHH_32\PERSONAL.exe (32 bits)
Size: 1,476,096 bytes
Time from start: 0 hours 0 mins 6 secs
Error occurred at: 16/05/2007, 19:43:36
Error description: Error ADODB.Recordset/16389 E_FAIL: OPEN
Args:
[ 1] = C MAESTRO
[ 2] = O Object
Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:OPEN(0)
Called from: => ADO_OPEN(263)
Called from: => DBUSEAREA(0)
Called from: => BROWRST(346)
Called from: personal.prg => (b)CREAMENU(118)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: personal.prg => PRINCIPAL(75)
System
======
CPU type: Intel(R) Celeron(R) M processor 1.60GHz 1600 Mhz
Hardware memory: 447 megs
Free System resources: 90 %
Antonio me sugirio revisar mis datos de conexion y estan correctos, uso Mysql 5.0, xharbour 0.99.71, adordd, borland++, a sugerencia de antonio compiler con el buildx que estoy utilizando el ejemplo de Mysql1 que proporcionan, y corre perfectamente conectandose con el servidor "www.freesql.org"
Agradezco cualquier orientacion al respecto, estoy en stand by.
Gracias de antemano,
Ramon Paredes
Managua Nicaragua |
nuevamente sobre el RDDADO | Ramon,
Es preferible que los nombres DNS sean en minusculas (en el caso linux deben de ser exactamente como se escriben, respetando minus y mayus).
[code:xj8zkpvb]USE Personal1 VIA "ADORDD" TABLE "MAESTRO" MYSQL ;
FROM "localhost" USER "root" PASSWORD "1234" ALIAS "MAESTRO"
DEFINE DIALOG oDlg FROM 1, 1 TO 25, 79
@ 1, 1 LISTBOX oBrw FIELDS MAESTRO->NUMERO, ;
MAESTRO->NOMBRES, ;
MAESTRO->APELLIDO1 ;
HEADERS "Codigo","Nombre ","Salario" ;
FIELDSIZES 60,200,60 ;
SIZE 284, 137 OF oDlg
[/code:xj8zkpvb]
Espero te sirva... |
nuevamente sobre el RDDADO | William,
Agradezco tu ayuda pero no funciona ni aun siguiendo la convencion de minusculas que me recomeindas,
Cualquier otra sugerencia la agradeceria, estoy por tirar la toalla,
Ramon Paredes
Managua, Nicaragua |
nuevamente sobre el RDDADO | Hola Ramon, estas usando XP?, otra pregunta tenes instalado algun firewall?.
Andres |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.