topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
no puedo hacer el refresh con MARIADB y xbrowse | [quote="sysctrl2":28gdk5rr]uso MARIADB sin problemas
echame un cable
en skype : SysCtrlSoftware arroba outlook punto com[/quote:28gdk5rr]
te envio email |
no puedo hacer el refresh con MARIADB y xbrowse | ok |
no puedo obtener todos los registros via ODBC MYSQL y ADO | Hola,
Usando MySQL con ADO via ODBC y Fivewin no puedo recuperar más de 1969 registros (añadiendo LIMIT 1969).
Si hago oRs := FW_OpenRecordSet( oConexion, "select * from mitabla"), en el oRs objeto obtengo:
0 IAccessor VERDADERO
1 IChapteredRowset VERDADERO
2 IColumnsInfo VERDADERO
3 IColumnsRowset VERDADERO
4 IConnectionPointContainer VERDADERO
5 IConvertType VERDADERO
6 ILockBytes FALSO
7 IRowset VERDADERO
8 IDBAsynchStatus FALSO
9 IParentRowset VERDADERO
10 IRowsetChange VERDADERO
11 IRowsetExactScroll VERDADERO
12 IRowsetFind VERDADERO
13 IRowsetIdentity VERDADERO
14 IRowsetInfo VERDADERO
15 IRowsetLocate VERDADERO
16 IRowsetRefresh VERDADERO
17 IRowsetResynch FALSO
18 IRowsetScroll VERDADERO
19 IRowsetUpdate VERDADERO
20 IRowsetView VERDADERO
21 IRowsetIndex FALSO
22 ISequentialStream VERDADERO
23 IStorage FALSO
24 IStream FALSO
25 ISupportErrorInfo VERDADERO
26 Preserve on Abort VERDADERO
27 Access Order 2
28 Append-Only Rowset FALSO
29 Blocking Storage Objects FALSO
30 Use Bookmarks VERDADERO
31 Skip Deleted Bookmarks VERDADERO
32 Bookmark Type 1
33 Cache Deferred Columns FALSO
34 Fetch Backwards VERDADERO
35 Hold Rows VERDADERO
36 Scroll Backwards VERDADERO
37 Change Inserted Rows VERDADERO
38 Column Privileges FALSO
39 Command Time Out 0
40 Preserve on Commit VERDADERO
41 Defer Column FALSO
42 Delay Storage Object Updates VERDADERO
43 Private1
44 Filter Operations 27
45 Find Operations 27
46 Hidden Columns 0
47 Immobile Rows VERDADERO
48 Literal Bookmarks VERDADERO
49 Literal Row Identity VERDADERO
50 Maximum Open Rows 0
51 Maximum Pending Rows 0
52 Maximum Rows 0
53 Column Writable FALSO
54 Memory Usage 0
55 Notification Granularity 1
56 Notification Phases 31
57 Column Set Notification 3
58 Row Delete Notification 3
59 Row First Change Notification 3
60 Row Insert Notification 3
61 Row Resynchronization Notification 3
62 Rowset Release Notification 3
63 Rowset Fetch Position Change Notification 3
64 Row Undo Change Notification 3
65 Row Undo Delete Notification 3
66 Row Undo Insert Notification 3
67 Row Update Notification 3
68 Bookmarks Ordered VERDADERO
69 Others' Inserts Visible FALSO
70 Others' Changes Visible FALSO
71 Own Inserts Visible VERDADERO
72 Own Changes Visible VERDADERO
73 Quick Restart VERDADERO
74 Reentrant Events VERDADERO
75 Remove Deleted Rows VERDADERO
76 Report Multiple Changes FALSO
77 Return Pending Inserts VERDADERO
78 Row Privileges FALSO
79 Asynchronous Rowset Processing 16
80 Row Threading Model 1
81 Server Cursor FALSO
82 Strong Row Identity VERDADERO
83 Objects Transacted FALSO
84 Unique Rows VERDADERO
85 Updatability 7
86 Batch Size 15
87 Update Criteria 2
88 Background Fetch Size 15
89 Initial Fetch Size 50
90 Background thread Priority 3
91 Cache Child Rows VERDADERO
92 Maintain Change Status FALSO
93 Auto Recalc 1
94 Unique Table
95 Unique Schema
96 Unique Catalog
97 Resync Command
98 Cursor Engine Version 60
99 Reshape Name
100 Update Resync 1
101 Release Shape On Disconnect FALSO
102 Bookmarkable VERDADERO
¿Alguno ha tenido este problema?.
PhpAdmin funciona correctamente.
Muchas gracias <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. |
no redondea correctamnete | Amigos
uso xharbour 0.82
No redondea correctamente en esta version de xharbour
local x:=5.8105
msgalert( round(x,3) )
sale 5.810
cuando deberia salir 5.811
si lo pongo directo si funciona bien
msgalert( round(5.8105))
porque
ha alguine le paso esto cual es la solucion
por q pasar a xharbour 0.99 es algo traumatico
Gracias |
no redondea correctamnete | Vladimir:
Usando la lib de Nanforum toolkits (Nanfor.lib)
ese problema se soluciona.
La función es FT_Round().
Mira si tienes en xHarbour, yo la uso con Harbour y la compilo
en mis programas y me funciona bien.
Saludos.
Ruben Fernandez. |
no redondea correctamnete | en xharbour 9.61 funciona ok
msgalert( round(x,3) )
5.811000
saludos
Patricio |
no redondea correctamnete | [quote="Vladimir Zorrilla":3a0g16bn]Amigos
uso xharbour 0.82
No redondea correctamente en esta version de xharbour
local x:=5.8105
msgalert( round(x,3) )
sale 5.810
cuando deberia salir 5.811
si lo pongo directo si funciona bien
msgalert( round(5.8105))
porque
ha alguine le paso esto cual es la solucion
por q pasar a xharbour 0.99 es algo traumatico
Gracias[/quote:3a0g16bn]
Amigo estas usando 1 decimal de mas, es Round(x,2) , y asi te redondeara a 5.81
Adriano |
no redondea correctamnete | No estoy de acuerdo con ACC69. Efectivamente, debería salirte 5.811, sin embargo puedes probar con round(x,4) a ver que te sale. Si sólo necesitas 3 decimales puedes probar a pasar la cifra a string con str(round(x,4) ,12,3) o algo similar.
Un saludo. |
no salen encabezados con tReport | que tal a todos:
Tengo un sistema que venia generando reportes muy bien, le hice algunos cambios y ya no le salen los encabezados sin embargo toda la informacion si se imprime, caso raro , en una version anterior si salen bien, que podrá ser? |
no salen encabezados con tReport | Listo compañeros, no se porque pero como el titulo (que es el nombre de la empresa) viene del archivo .ini y se carga en la variable cEmpresa, se debe convertir con oEmToAnsi(cEmpresa), caso especial ya que lo tenia solo en una empresa y ahora que me lo solicitaron en otra me sucedió lo comentadoo , lo bueno que ya se solucionó..
gracias por el interes, (vi varios accesos) |
no se cierra el dialogo de un meter que hago mal | Hola <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> otra vez de nuez aqui molestando con una preguntita tengo una cajita de meter para indexar pero al terminar no se cierra que me falta. <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> aaah y se puede cambiar el color de la barrita del meter que es azul a otro color <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> SaluditosAida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> LOCAL oDlg, oMtr LOCAL nPos USE sos DEFINE DIALOG oDlg @ 1, 1 METER oMtr VAR nPos TOTAL LASTREC(); SIZE 100, 20 * @ 3, 1 BUTTON "Start"; * ACTION STARTINDEX( oMtr ) ACTIVATE DIALOG oDlg CENTER ON INIT STARTINDEX( oMtr ) CLOSE RETURN NILSTATIC FUNCTION STARTINDEX( oMtr ) INDEX ON sos->clave TO sos EVAL ( oMtr:Set( RECNO() ), oMtr:Refresh(), .T. ) RETURN nil |
no se cierra el dialogo de un meter que hago mal | [quote="AIDA":8hbwhd0u]tengo una cajita de meter para indexar pero al terminar no se cierra que me falta.aaah y se puede cambiar el color de la barrita del meter que es azul a otro color[/quote:8hbwhd0u]Hola Aida:Prueba así:[code:8hbwhd0u]LOCAL oDlg, oMtr
LOCAL nPos
USE sos
DEFINE DIALOG oDlg
@ 1, 1 METER oMtr VAR nPos TOTAL LASTREC();
SIZE 100, 20 BARCOLOR nRGB( 255,0,255), CLR_WHITE
ACTIVATE DIALOG oDlg CENTER ON INIT ( STARTINDEX( oMtr ), oDlg:End() )
RETURN NIL
[/code:8hbwhd0u]Saludos.Manuel Mercado |
no se cierra el dialogo de un meter que hago mal | U´PS solo me falta eso <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> huy que pena <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Gracias que amableSaludosAida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
no se cierra el dialogo de un meter que hago mal | Una ultima preguntita de los meters <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> se podra hacer un meter vertical <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> GraciasAida <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
no se cierra el dialogo de un meter que hago mal | [quote="AIDA":2xwvx43k]se podra hacer un meter vertical[/quote:2xwvx43k]Un Meter no pero una Progress Bar sí, chécate Progres1.prg en \FWH\Samples.Saludos.Manuel Mercado |
no se cierra el dialogo de un meter que hago mal | Tenquius Manuel lo buscare ese no lo conocia <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Que tengas una bonita semanaAida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
no se cierra el dialogo de un meter que hago mal | Ya vi el ejemplo del Progress Bar si se ven bonitos y de color verde no le entiendo como usarlos para indexar me pondre hacer mis mescolancias con el Progress Bar a ver que me sale.Gracias Manuel <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Aida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
no se como hacer funcionar el setfilter | Hola. tengo esta oQry:
[code=fw:2hluvs1q]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> BRW_PRODUCTOS ;<br /><span style="color: #ff0000;">"SELECT "</span> + ;<br /><span style="color: #ff0000;">"a.id AS c1, "</span> + ;<br /><span style="color: #ff0000;">"s.nombre AS c2, "</span> + ;<br /><span style="color: #ff0000;">"n.nombre AS c3, "</span> + ;<br /><span style="color: #ff0000;">"d.nombre AS c4 "</span> + ;<br />;<br /><span style="color: #ff0000;">"FROM tbprod AS a "</span> + ;<br />;<br /><span style="color: #ff0000;">"LEFT JOIN tbprodnom AS n ON n.id = a.idnombre "</span> + ;<br /><span style="color: #ff0000;">"LEFT JOIN tbdistribuidores AS d ON a.iddistribuidor = d.id "</span> + ;<br /><span style="color: #ff0000;">"LEFT JOIN tbsucursal AS s ON a.idsucursal = s.id "</span> +;<br />;<br /><span style="color: #ff0000;">"ORDER BY n.nombre "</span><br /> </div>[/code:2hluvs1q]
que me funciona sin errores al hacer
[code=fw:2hluvs1q]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">oQry</span> := ::<span style="color: #000000;">oCnx</span>:<span style="color: #000000;">QUERY</span><span style="color: #000000;">(</span> BRW_PRODUCTOS <span style="color: #000000;">)</span><br /> </div>[/code:2hluvs1q]
ahora necesito aplicarle un filtro a esa consulta por el campo "s.id" (en el ejemplo puse que sea igual al numero 1) y ahi tengo el error cuando hago esto no me funciona, que estoy haciendo mal?
[code=fw:2hluvs1q]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">oQry</span>:<span style="color: #000000;">setfilter</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"s.id = ?"</span>, <span style="color: #000000;">{</span><span style="color: #000000;">1</span><span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> </div>[/code:2hluvs1q]
gracias |
no se como hacer funcionar el setfilter | No veo incluida esa columna s.id entre las columnas del select. |
no se despliega Icono | Esta pregunta ya la han hecho en otras ocasiones
En este ejemplo si me muestraa el ICONO factura.ico
define icon oIco FILENAME "factura.ICO"
define brush oBrush filename mxempre->mfondo
DEFINE Window oWnd of oMenu FROM 1, 1 TO 400,600 pixel;
TITLE "Menu Principal de Ventas";
ICON oIco;
MENU BuildMenu() ;
brush oBrush
DEFINE MESSAGE OF oWnd ;
NOINSET CENTERED KEYBOARD DATE CLOCK
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Salir?" );
MAXIMIZED
En este otro ejemplo NO FUNCIONA!!
define ICON oIcon filename "Factura.ico"
define DIALOG oVentana of Ventana TITLE "Facturas/Cotizaciones";
FROM 0,0 TO 35,100;
ICON oIcon;
FONT oletra
oVentana:nStyle:=NOR(WS_MAXIMIZEBOX,WS_MINIMIZEBOX)
ACTIVATE DIALOG oVentana CENTER valid(sale)
cada ejemplo esta en diferente programa, el primero un menu y el segundo un dialogo.
Se ve muy feo el cuadrito blanco que me muestra sin la imagen!!
Gracias por su ayuda!! |
no se despliega Icono | Haz ACTIVATE DIALOG oVentana CENTER valid(sale) ON INIT oVentana:SetIcon( oIcon ) |
no se porque no me ordena... | Hola.
Tengo este array
[url:37i6ncaf]https://drive.google.com/file/d/1xh7F9_MgJOngbv336i57v4hjHuwHyPmB/view?usp=sharing[/url:37i6ncaf]
y quiero ordenarlo de esta manera pero no me lo ordena.
[code=fw:37i6ncaf]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">aDatos</span> := ASort<span style="color: #000000;">(</span> ::<span style="color: #000000;">aDatos</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">{</span> | x, y | ;<br /> x<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"nombre_nacimiento"</span> <span style="color: #000000;">]</span> < y<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"nombre_nacimiento"</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span></div>[/code:37i6ncaf]
gracias. |
no se porque no me ordena... | [quote="goosfancito":1znsc84o]Hola.
Tengo este array
[url:1znsc84o]https://drive.google.com/file/d/1xh7F9_MgJOngbv336i57v4hjHuwHyPmB/view?usp=sharing[/url:1znsc84o]
y quiero ordenarlo de esta manera pero no me lo ordena.
[code=fw:1znsc84o]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">aDatos</span> := ASort<span style="color: #000000;">(</span> ::<span style="color: #000000;">aDatos</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">{</span> | x, y | ;<br /> x<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"fecha_nacimiento"</span> <span style="color: #000000;">]</span> < y<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"fecha_nacimiento"</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span></div>[/code:1znsc84o]
gracias.[/quote:1znsc84o] |
no se porque no me ordena... | Gustavo, pudiste arreglarlo?
Lo que note es que en el caso de "fecha_nacimiento" esta en formato texto, si queres ordenarlo en orden cronologico tendrias que convertirlo a fecha |
no se porque no me ordena... | bien! si lo pase con ctod() y ahora si funciona.
gracias |
no se puede descargar desde HiperUpload ? | Ni yo ni algunos de los amigos que les pedi hacer unas descargas, han podido descargar archivos desde ese sitio.....
Se requiere algo especial ?
Gracias de antemano. |
no se puede descargar desde HiperUpload ? | Julio,
No, nada en especial, lo que ocurre es que a veces el servicio falla.
Ultimamente estamos usando <!-- w --><a class="postlink" href="http://www.rapidshare.com">www.rapidshare.com</a><!-- w --> |
no se puede descargar desde HiperUpload ? | Antonio,
¿ Has mirado <!-- w --><a class="postlink" href="http://www.mediafire.com">www.mediafire.com</a><!-- w --> ? Es excelente y no hay limitaciones de tiempo para descargas. Pienso que es mejor que el rapidshare, pues una vez que descargues un archivo en el rapidshare, no se puede descargar otro luego después, asi que tienes que esperar unos tantos minutos.
Saludos, |
no se puede descargar desde HiperUpload ? | Kleyber,
Gracias. Sí la verdad es que ya hay muchos, sería conveniente que tuviésemos una lista de todos los que podemos usar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
no sizing the column of xbrowse | :lAllowRowSizing := .f.
:lAllowColSwapping := .f.
:lAllowColHiding := .f.
I use these parameters
but the user can move the column .... why ?
why not exit :lAllowRowSizing ? |
no sizing the column of xbrowse | Hello Silvio,
maybe you look for:
oBrw:lAllowColSwapping := .f.
Best regards,
Otto |
no sizing the column of xbrowse | [quote="Otto":1h4v67cv]Hello Silvio,
maybe you look for:
oBrw:lAllowColSwapping := .f.
Best regards,
Otto[/quote:1h4v67cv]
Please I wrote
on my config I have allready
WITH OBJECT oBrw
:nRowHeight := 27
:nClrBorder := CLR_GRAY
:lDrawBorder := .t.
* :nColorBox := CLR_HRED
:lHscroll := .f.
:lVscroll := .f.
:l2007 := .f.
:l2015 := .f.
[b:1h4v67cv] :lAllowRowSizing := .f.
:lAllowColSwapping := .f.
:lAllowColHiding := .f.[/b:1h4v67cv]
:lRecordSelector := .f.
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:SetGroupHeader( "Numeri Estratti ", 1, 6 )
:SetGroupHeader( if( nRadio == 1, "Somme estratti", "Distanze cilometriche" ), 7, 16 )
:nMarqueeStyle := MARQSTYLE_NOMARQUEE
:CreateFromCode()
End
[b:1h4v67cv]But I have this problem [/b:1h4v67cv]
[img:1h4v67cv]https://i.postimg.cc/cLsp5zbL/dd.png[/img:1h4v67cv]
the final user must not resizing the columns |
no sizing the column of xbrowse | You need for cols
:lAllowSizings := .f. |
no tengo mac no tengo fwh mac | Hola.
Tengo un programita que solo saca los años entre dos fechas. y un amigo necesita que ese programa le funcione en la mac que tiene. me pueden orientar como podría hacer para transformar este programita que tengo en windows a mac ?
gracias. |
no tengo mac no tengo fwh mac | Lo puedes programar en FiveMac, pero lo mas sencillo es que uses WinBottler para Mac que es una utilidad que automaticamente te permite ejecutar tu EXE de Windows en Mac:
[url:2vk6kibl]https://winebottler.kronenberg.org/[/url:2vk6kibl] |
no tengo mac no tengo fwh mac | gracias |
no wait dialog of mdichild vs pure no wait dialog | Hi,
a very stupid question ,what is the different between no wait dialog of mdichild vs pure no wait dialog ?
DEFINE WINDOW oWndChild MDICHILD OF oWnd FROM 5,5 TO 6,6
define dialog odlg of owndchild resource "aaa"
redefine get var1 id 101 of odlg
...
activate dialog odlg no wait valid (owndchild:end()
activate dialog window owndchild
vs
define dialog odlg resource "aaa"
redefine get var1 id 101 of odlg
...
activate dialog odlg no wait
TKS!
Shuming Wang |
no-modal preview | Hello,
A customer asked the possibility to work on main window during the preview, then I changed the preview to not modal setting lPrvModal on device to false.
The no-modal preview has 2 problems:
1) it shows under the main window
2) If I move it the one page preview become thin:
[img:3engsmew]https://i.imgur.com/Uk54hfM.jpg[/img:3engsmew]
can anybody help me? <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
no-modal preview | Antonio
You might try turning off the left side page preview thumbnails.. set this code at the top of your program and see if that helps..
Rick Lipkin
[code=fw:nay9hajd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//turn off report thumbnails</span><br />TPreview<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">lListViewHide</span> := .T.<br /> </div>[/code:nay9hajd] |
no-modal preview | After some analysis we decide to not use no-modal preview... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
no-modal preview | If I move it the one page preview become thin:
Hello Antonino,
are you sure you use the same printer for preview in modal and no-modal mode.
This picture seems to me to be a preview of a receipt printer. Here you have a very large page height.
I never got preview working with receipt printer.
I always took the same way as you ( decide to not use preview).
Best regards,
Otto |
nokia 6600 symbian OS | I need to code for Nokia 6600.
Can FWPPC code recompiled to Symbian C++ ? |
nokia 6600 symbian OS | Hoe,
is there a Windows Mobile for Nokia 6600 ? FWPPC uses Windows Mobile |
nokia 6600 symbian OS | No, Symbian is not a Pocket PC Compatible Operating System.
Take a look into smartphones with Pocket PC installed, BenQ, HP, Qtek, O2, and I-mate have very nice models not too expensive (my choice actually would be an HP 7000 series Smartphoe with GPS integrated, but it's almost 800 dollars, so I'll keep my Qtek-9100).
Belive me, use a SmartPhone with Windows Mobile once and you will never want another mobile phone. |
nokia 6600 symbian OS | The reason is because a customer prefers to buy Nokia 6600 or similar as it is cheaper for bulk purchase(100-200units) as compares to smartphone.
Since FWPPC is compiled by Harbour to C, I wonder if it can be compiled to Symbian C++.
Is there any simple tool to develop application on Symbian OS ? |
nokia 6600 symbian OS | Hoe,
* Since FWPPC is compiled by Harbour to C, I wonder if it can be compiled to Symbian C++.
FWPPC requires Windows Mobile operating system |
nokia 6600 symbian OS | fwppc samples run also with HTC TYNT ( <!-- w --><a class="postlink" href="http://www.htc.com">www.htc.com</a><!-- w -->)
Perhaps in the summer htc europe sale htc p4550 smartphone Umts with GPs integrated GLobal Sirf III and I wait for it
HTC is the qtek future |
nombre de clase BLOCK en GetAllWin | Hola a todos :
Tengo una consulta sobre la función GetAllWin, la he usado en una parte de mi código y en el array que devuelve he encontrado que hay algunos elementos cuya propiedad classname tiene el valor "BLOCK" y su ValType es "N" de numérico.
El resto de elementos son de tipo Objeto y la propiedad classname me devuelve TSAY, TGET, etc.
Mi pregunta es : ¿ qué son esos BLOCK de tipo numérico ?
Muchas gracias.
FW 2.3 |
nombre de clase BLOCK en GetAllWin | Puedes proporcionar un PRG de ejemplo en el que se pueda comprobar lo que comentas ? gracias |
nombre de clase BLOCK en GetAllWin | Hola Antonio, no puedo proporcionar un PRG, puesto que el error me da cuando pulso una tecla de función que tengo asignada por SET KEY, y no siempre se produce el error, he conseguido aislarlo y sé que es después de haber accedido a una clase creada por mi, llamada TTabla.
He copiado el error.log para que veas que el fallo está en la funcion READVAR (), la he encontrado en VALBLANK.PRG y se produce en la siguiente línea :
local nWnd := AScan( GetAllWin(),;
{ | oWnd | oWnd:lFocused .and. oWnd:ClassName() == "TGET" } )
Cuando evalúa oWnd:lFocused de la lista de GetAllWin, en algunos casos existen elementos con valor "BLOCK" en classname y ValType = "N". Lo he solucionado dando la vuelta a la condición oWnd:ClassName() == "TGET" .and. oWnd:lFocused
Todavía no he podido saber cuando aparecen estos "BLOCK" en la lista GetAllWin, intentaré chequear la clase TTabla a ver en que momento se crean. De todas formas era más la curiosidad de saber qué devuelve la función GetAllWin y qué tipos de objetos existen.
Un saludo.
Application
===========
Path and name: W:\ANZAMAR\ICM\ENTRADAW.EXE (16 bits)
Size: 1,444,928 bytes
Max files handles permited: ( SetHandleCount() ) 255
Time from start: 0 hours 0 mins 17 secs
Error occurred at: 28-08-09, 17:49:50
Error description: Error Objects/8 No Object Msg.: NUMERIC:LFOCUSED
Stack Calls
===========
Called from LOCKERRHAN(0)
Called from (b)INITHANDL$(0)
Called from UNDEFINED:LFOCUSED(0)
Called from (b)READVAR(0)
Called from ASCAN(0)
Called from READVAR(0)
Called from TRAER(871)
Called from (b)PEDIR(238)
Called from TBUTTON:KEYDOWN(0)
Called from TBUTTON:KEYDOWN(0)
Called from TBUTTON:KEYDOWN(0)
Called from TBUTTON:HANDLEEVEN(0)
Called from DIALOGBOXI(0)
Called from TDIALOG:ACTIVATE(0)
Called from GET1(314)
Called from PEDIR(239)
Called from (b)DET_ENT(58)
Called from TTABLA:NUEVO(787)
Called from (b)INI_OPCION(431)
Called from TTABLA:EJECUTA_OP(492)
Called from TTABLA:TECLAFUNCI(824)
Called from (b)ACTIVA_TAB(172)
Called from TCBROWSE:KEYDOWN(0)
Called from TCBROWSE:KEYDOWN(0)
Called from TCBROWSE:KEYDOWN(0)
Called from TCBROWSE:HANDLEEVEN(0)
Called from DIALOGBOXI(0)
Called from TDIALOG:ACTIVATE(0)
Called from TTABLA:ACTIVA_TAB(202)
Called from DET_ENT(61)
Called from (b)MENUPRIN(72)
Called from TMENU:COMMAND(0)
Called from TWINDOW:COMMAND(0)
Called from TWINDOW:HANDLEEVEN(0)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(0)
Called from MAIN(59)
System
======
CPU type: Pentium
Hardware memory: 1024 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Compiler version: Clipper (R) 5.3b Intl. (Rev. 338) (1997.04.25)
Windows and MsDos versions: 3.95, 5.0
Windows total applications running: 5
1 explorer.exe
2 C:\WINDOWS\SYSTEM32\USER.EXE
3 W:\ANZAMAR\ICM\ENTRADAW.EXE
4 C:\WINDOWS\SYSTEM32\MMSYSTEM.DLL
5 C:\WINDOWS\SYSTEM32\WOWEXEC.EXE
Variables in use
================
Procedure Type Value
==========================
LOCKERRHAN
Param 1: O Class: ERROR
Param 2: B { || ... } CodeBlock
(b)INITHANDL$
Param 1: O Class: ERROR
UNDEFINED:LFOCUSED
(b)READVAR
Param 1: N 0
ASCAN
Param 1: A Len: 53
Param 2: B { || ... } CodeBlock
READVAR
Local 1: U
TRAER
Param 1: U Len: 2
Local 1: U
Local 2: U
Local 3: U
Local 4: U
Local 5: U
Local 6: N 1
(b)PEDIR
Param 1: C "DIALOGBOXI"
Param 2: N 0
Param 3: O Class: TBUTTON
TBUTTON:KEYDOWN
Param 1: N 115
Param 2: N 4063233
Local 1: O Class: TBUTTON
Local 2: B { || ... } CodeBlock
TBUTTON:KEYDOWN
Param 1: N 115
Param 2: N 4063233
Local 1: O Class: TBUTTON
TBUTTON:KEYDOWN
Param 1: N 115
Param 2: N 4063233
Local 1: O Class: TBUTTON
TBUTTON:HANDLEEVEN
Param 1: N 256
Param 2: N 115
Param 3: N 4063233
DIALOGBOXI
Param 1: N 5622
Param 2: C "„ È€ I j 2 { PSTATIC PEDIDO : > | PSTATIC ARTICULO : > } PSTATIC POSICION : ) 2 ~ PSTATIC PRECIO : 6 > PSTATIC CANTIDAD : P , € PSTATIC TOTAL : 0 ‚ PEDIT 0 8
$ ‚ € PEDIT f Œ
ƒ PSTATIC 8 „ € PEDIT - - 8 ' … ‚ PEDIT 0.00 8 4 † ‚ PEDIT 1 8 N (
‡ ‚ PEDIT 0.00 ôÿèÿ. ˆ PBUTTON Aceptar "
Param 3: N 446
Param 4: O Class: TDIALOG
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .F.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Local 1: O Class: TDIALOG
Local 2: N 446
Local 3: U
Local 4: U
Local 5: U
Local 6: O Class: TDIALOG
GET1
Param 1: O Class: TDIALOG
Param 2: O Class: TCBROWSE
Local 1: O Class: TDIALOG
Local 2: N 12
Local 3: N 10
PEDIR
Param 1: O Class: TDIALOG
Param 2: O Class: TCBROWSE
Local 1: L .F.
Local 2: N 1
(b)DET_ENT
Param 1: O Class: TDIALOG
Param 2: O Class: TCBROWSE
TTABLA:NUEVO
Local 1: O Class: TTABLA
Local 2: U
Local 3: N 19042
Local 4: L .F.
(b)INI_OPCION
TTABLA:EJECUTA_OP
Param 1: N 2
Local 1: O Class: TTABLA
TTABLA:TECLAFUNCI
Param 1: N 32
Param 2: N 3735553
Local 1: O Class: TTABLA
Local 2: L .F.
Local 3: N 2
(b)ACTIVA_TAB
Param 1: N 32
Param 2: N 3735553
TCBROWSE:KEYDOWN
Param 1: N 32
Param 2: N 3735553
Local 1: O Class: TCBROWSE
Local 2: U
TCBROWSE:KEYDOWN
Param 1: N 32
Param 2: N 3735553
Local 1: O Class: TCBROWSE
TCBROWSE:KEYDOWN
Param 1: N 32
Param 2: N 3735553
Local 1: O Class: TCBROWSE
TCBROWSE:HANDLEEVEN
Param 1: N 256
Param 2: N 32
Param 3: N 3735553
DIALOGBOXI
Param 1: N 5622
Param 2: C "„ È€9 ’G Entrada de Lineas entradas de Proveedor 2 e PSTATIC ALBARAN : x > f PSTATIC PROVEEDOR :
, g PSTATIC FECHA : x
& h PSTATIC BASE : À
i PSTATIC IVA : ö
, j PSTATIC TOTAL : ‚
k PSTATIC ?
l ‚ PEDIT 0 ‘m ¡PTCBROWSE 7 N
n PBUTTON Modificar = (INTRO) „ M
o PBUTTON A¤adir = (ESP) Ð N
p PBUTTON Borrar = (CTRL + <-) N
q PBUTTON Salida = (ESC) 7 ,N
r PBUTTON Imprimir = (F3) „ ,M
s PBUTTON Buscar = (F4) Ð ,N
t PBUTTON Orden = (F6) ,N
u PBUTTON Traer = (F7) 7 9N
v PBUTTON Etiquetas = (F2) „ 9M
w PBUTTON Observaciones = (F9)
$
x PSTATIC
$
y PSTATIC "
Param 3: N 666
Param 4: O Class: TDIALOG
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .F.
Param 5: B { || ... } CodeBlock
Param 6: L .T.
Param 7: B { || ... } CodeBlock
Local 1: U
Local 2: U
Local 3: O Class: TDIALOG
Local 4: N 666
Local 5: U
Local 6: U
Local 7: U
Local 8: O Class: TDIALOG
TTABLA:ACTIVA_TAB
Local 1: U
Local 2: U
Local 3: O Class: TTABLA
Local 4: C "MOVIMIEN"
Local 5: A Len: 5
Local 6: A Len: 5
Local 7: N 802.76
Local 8: N 34.76
Local 9: A Len: 5
Local 10: N 0
Local 11: N 100
DET_ENT
Local 1: U
Local 2: A Len: 3
Local 3: B { || ... } CodeBlock
Local 4: A Len: 4
(b)MENUPRIN
Param 1: O Class: TMENUITEM
TMENU:COMMAND
Param 1: N 20001
Local 1: O Class: TMENU
Local 2: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20001
Param 2: N 0
Local 1: O Class: TWINDOW
Local 2: N 0
Local 3: N 20001
Local 4: N 0
TWINDOW:HANDLEEVEN
Param 1: N 273
Param 2: N 20001
Param 3: N 0
WINRUN
Param 1: N 666
TWINDOW:ACTIVATE
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: B { || ... } CodeBlock
Param 7: B { || ... } CodeBlock
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: U
Param 18: U
Param 19: U
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
MAIN
Local 1: U
Local 2: U
Local 3: U
Linked RDDs
===========
DBFNTX
DBF
_DBFCDX
DBFCDX
DataBases in use
================
1: COLOR RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 1 .F. .F.
Indexes in use TagName
Relations in use
2: CONFIGUR RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 1 .F. .F.
Indexes in use TagName
Relations in use
3: CONF_ANO RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 1 .F. .F.
Indexes in use TagName
Relations in use
4: DET_PRO RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 3058 .F. .F.
Indexes in use TagName
=> Delegacion + STR ( Pedido, 6 ) + Ar1DET_PRO
Delegacion + IF ( Cantidad > Recibi2DET_PRO
Delegacion + IF ( Cantidad > Recibi3DET_PRO
Relations in use
5: PROVEEDO RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
83 219 .F. .F.
Indexes in use TagName
=> Delegacion + Codigo 1PROVEED
Delegacion + Nombre 2PROVEED
Relations in use
6: ARTICULO RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
18771 35142 .F. .F.
Indexes in use TagName
=> Delegacion + Codigo 1ARTICUL
Delegacion + Nombre 2ARTICUL
Relations in use
7: ALMACEN RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
18771 35142 .F. .F.
Indexes in use TagName
=> Articulo 1ALMACEN
LTOC ( Stock - StockCli < StockMin 2ALMACEN
Relations in use
8: ENTREGAS RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
66 66 .F. .F.
Indexes in use TagName
=> Delegacion + STR ( Numero, 6 ) 1ENTREGA
Delegacion + DTOS (Fecha) 2ENTREGA
Delegacion + Proveedor + DTOS (Fech3ENTREGA
Relations in use
1: TO ENTREGAS->Delegacion + ENTREGAS->Proveedor INTO PROVEEDO
9: => MOVIMIEN RddName: _DBFCDX
==============================
RecNo RecCount BOF EOF
19042 19114 .F. .F.
Indexes in use TagName
=> Delegacion + EntraSale + Valorado +1MOVIMIE
Delegacion + Articulo + DTOS ( Fech2MOVIMIE
Delegacion + EntraSale + STR ( Fact3MOVIMIE
Delegacion + EntraSale + DTOS (Fech4MOVIMIE
Delegacion + EntraSale + Represen +5MOVIMIE
Delegacion + EntraSale + Represen +6MOVIMIE
Delegacion + Cliente + Articulo + D7MOVIMIE
Relations in use
Classes in use:
===============
1 TANNOS
2 TWINDOW
3 TMENU
4 TMENUITEM
5 TBRUSH
6 TFONT
7 TMSGBAR
8 TRECT
9 TMSGITEM
10 TTIMER
11 TCONTROL
12 TBITMAP
13 TTALLAS
14 TTABLA
15 TDIALOG
16 TSAY
17 TGET
18 GET
19 TWBROWSE
20 TCBROWSE
21 TCCOLUMN
22 TBUTTON
23 TSCROLLBAR
24 ERROR
25 TSTRUCT
Memory Analysis
===============
Static memory:
data segment: 64k
Initial size: 50176 bytes (SYMP=936, Stack=18000, Heap=9112)
PRG Stack: 11621 bytes
267 Static variables: 3738 bytes
Dynamic memory consume:
Actual Value: 858911 bytes
Highest Value: 1078047 bytes
|
nombre de clase BLOCK en GetAllWin | El código fuente de GetAllWin() está en source\classes\window.prg
Puedes leer la documentación de GetAllWin() en el wiki de FiveWin:
[url:344tooj1]http://wiki.fivetechsoft.com/doku.php?id=fivewin_funcion_getallwin[/url:344tooj1] |
nombre de clase BLOCK en GetAllWin | Voy a revisarlo, muchas gracias. |
nombres en pellesc | hola foro,
estoy empezando a usar pellesc y pues ya no se por donde buscarle, tengo mi archivo .res importo un bitmap y me le pone de nombre #8001, ahi le doy click derecho y en propiedades cambio el nombre por "Almacen" lo grabo y cierro mi archivo, pero cuando lo vuelvo a abrir el nombre del bitmap me lo deja nuevamente en #8801, que pedo? como les puedo cambiar los nombre a los recursos, ya sea bitmaps, dialogos, etc...
Gracias
Salu2
Paco |
nombres en pellesc | A ver si no estás grabando el fichero.
Para grabar todo el .rc o el .res tienes que estar en la pestaña del fichero, porque si estas en la pestaña de algún diálogo o recurso, no se graba (el iconito de grabar de los tres discos, nanai, no lo uses), usa el de la izquierda.
no se si me explico...
Yo uso el pellesc desde que migré a harbour y te aseguro que funciona a las mil maravillas.
Cualquier problema, no dudes en comentarmelo |
nombres en pellesc | [quote="Francisco Horta":175rqoh3]hola foro,
estoy empezando a usar pellesc y pues ya no se por donde buscarle, tengo mi archivo .res importo un bitmap y me le pone de nombre #8001, ahi le doy click derecho y en propiedades cambio el nombre por "Almacen" lo grabo y cierro mi archivo, pero cuando lo vuelvo a abrir el nombre del bitmap me lo deja nuevamente en #8801, que pedo? como les puedo cambiar los nombre a los recursos, ya sea bitmaps, dialogos, etc...
Gracias
Salu2
Paco[/quote:175rqoh3]
Lo q angel quiere decir es que para guardar, debes posicionarte en
la pestaña donde están todos tus recursos para que puedas grabar.
Vaya, en donde dice el nombre del archivo de tus recursos.
ahi presionas el botón salvar.
Saludos |
nombres en pellesc | Francisco:
Para cambiarle el nombre yo lo coloco entre comillas.
Asi: "Almacen", lo guardas y ya esta, si no lo guardas
el programa te dice si deseas guardar los cambios
al salir y ahi le dices que si y asunto arreglado.
Saludos.
Ruben Fernandez |
nombres en pellesc | Gracias a todos, funciono, algo he de haber estado haciendo mal,
Salu2
Paco |
nomodal dialog menu area shows pre background ? | Hi !
NoModal dialog menu area, always shows background (before openning this dialog) after the dialog opened, resized, till you click the dialog menu.
FWH1104 +Harbour 3.0
Best regards!
Shuming Wang |
nomodal dialog menu area shows pre background ? | Shuming,
Could you please provide a small example to test it ? Thanks |
nomodal dialog menu area shows pre background ? | test1.prg
#include "fivewin.ch"
function main()
public ownd,omenu
define window ownd FROM 0,0 TO 10,10
activate window ownd on init buildmenu(ownd)
function buildmenu(ownd)
menu omenu 2007
menuitem "aaa" action aaa()
menuitem "bbb"
endmenu
ownd:setmenu(omenu)
ownd:refresh()
return
function aaa()
local odlg
define dialog odlg resource "aaa"
activate dialog odlg nowait on init aaa00(odlg)
return
function aaa00(odlg)
local omenu2
menu omenu2 2007
menuitem "open"
menuitem "close"
endmenu
odlg:setmenu(omenu2)
odlg:refresh()
return
test1.rc
aaa DIALOG 0, 0,100, 100
STYLE WS_CHILD | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
{
} |
nomodal dialog menu area shows pre background ? | If remove/delete ' WS_CHILD ' in .rc , it works fine !
<!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Shuming Wang |
nomodal dialog menu area shows pre background ? | Very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
non-standard behavior | Hi,
If I run this little program ....
#include "fivewin.ch"
#define crlf CHR(13)+CHR(10)
FUNCTION main()
LOCAL oDlg
LOCAL oGet1 , cGet1 := "Aaaaa " + crlf + "Bbbbbbb "
LOCAL oGet2 , cGet2 := "Cccccc Dddd Eeeeee "
DEFINE DIALOG oDlg
@ 1 , 1 GET oGet1 VAR cGet1 OF oDlg SIZE 100 , 30 PIXEL MEMO
@ 3 , 1 GET oGet2 VAR cGet2 OF oDlg
ACTIVATE DIALOG oDlg CENTER
RETURN nil
... it's evident that the behavior of this program is not standard.
All my programs behave the same way, especially for:
- it selects all get content if I enter in the get object using TAB key
- if I click with mouse in the get object over the last character cursor is positioned at the last character
- If I select in memo field two rows of text If I paste in a single line get only first line is copied
The list ends here!
Another consideration is: If I introduce some modifications to achieve a normal behavior I lose some features that I have to create them to play them one by one, unsuccessfully.
The question: is there a solution to resolve the three listed problems?
King regards
marco |
non-standard behavior | Marco,
1. Do you mean when the MEMO gets focus ? All text is selected, right ?
2. I don't understand what you mean here. What is the problem ?
3. Here it is working fine. I select the two lines of your example and then paste them in UEStudio and they are there |
non-standard behavior | Antonio,
is it a version problem?
I use a version october 2009. |
non-standard behavior | >1. Do you mean when the MEMO gets focus ? All text is selected, right ?
Using TAB key when I enter a GET all get content has to be selected MEMO GET and normal GET
>2. I don't understand what you mean here. What is the problem ?
If I click in a GET cursor position has to be adapted to the ALLTRIM( oget:varget() ) that ias at the end of the last character
>3. Here it is working fine. I select the two lines of your example and then paste them in UEStudio and they are there
I'm talking about the possibility to select multiple line and paste in a single line
STRTRAN( cTmp , crlf , " " ) for instance
many thanks
marco |
non-standard behavior | Marco,
FWH users usually don't want that GETs text gets automatically selected as when the user types something all the content is erased.
Do you want all the text to be selected ? (in fact that is the standard behavior) |
non-standard behavior | It seems to me that if the picture has "@K" in it, then all text should be selected when tab, arrow, or enter key was used prior to the get.
This gives the user a visual clue that if they type a letter all text gets cleared. |
non-standard behavior | >> Do you want all the text to be selected ? (in fact that is the standard behavior)
Yes! My customers want |
non-standard behavior | To Gale
>It seems to me that if the picture has "@K" in it, then all text should be selected when tab, arrow, or enter key was used prior to the >get.
>This gives the user a visual clue that if they type a letter all text gets cleared.
with PICTURE "@K" it's the same
If users accidently type a letter and delete all selected text, pressing CTRL_Z or Right Mouse Undo they return to previus value. |
non-standard behavior | It sounds like you want selectall on all the fields but to me it should only be that way only if you use a picture with "@K".
Without "@K" it should act normally.
I modified tget and mget so that it would do a selectall when picture includes a "K" like "@K" .
My users appreciate the visual clue that selectall provides. |
non-standard behavior | In this little sample I select all get content using TAB key.
But If I press a "X" character I find (in second get)
X instead of Cccccc Ddddd Eeeeeeee
If I press CTRL_Z or Right mouse to Undo this accidental error
I cannot undo this operation.
Any hints?
King regard
Marco
[code=fw:2oanp0za]<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: #00D7D7;">#define</span> crlf CHR<span style="color: #000000;">(</span><span style="color: #000000;">13</span><span style="color: #000000;">)</span>+CHR<span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /><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> oDlg<br /> <span style="color: #00C800;">LOCAL</span> oGet1 , cGet1 := <span style="color: #ff0000;">"Aaaaa "</span> + crlf + <span style="color: #ff0000;">"Bbbbbbb "</span><br /> <span style="color: #00C800;">LOCAL</span> oGet2 , cGet2 := <span style="color: #ff0000;">"Cccccc Dddd Eeeeee "</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span> , <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cGet1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span> , <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> MEMO<br /> oGet1:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span> || entraget<span style="color: #000000;">(</span> oGet1 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">3</span> , <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet2 <span style="color: #0000ff;">VAR</span> cGet2 <span style="color: #0000ff;">OF</span> oDlg<br /> oGet2:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span> || entraget<span style="color: #000000;">(</span> oGet2 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> ENTRAGET<span style="color: #000000;">(</span> oGet <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nPos1 := oGet:<span style="color: #000000;">nPos</span><br /><span style="color: #00C800;">LOCAL</span> nPos2 := <span style="color: #000000;">1</span><br /><br /><span style="color: #00C800;">IF</span> GetKeyState<span style="color: #000000;">(</span> VK_LBUTTON <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> nPos1 < Len<span style="color: #000000;">(</span> RTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">varget</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> nPos2 := nPos1 <span style="color: #000000;">+1</span><br /> <span style="color: #00C800;">ELSE</span><br /> nPos2 := Len<span style="color: #000000;">(</span> RTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">varget</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>+ <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">ENDIF</span><br /> oGet:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> nPos2 <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ELSE</span><br /> oGet:<span style="color: #000000;">SelectAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2oanp0za] |
non-standard behavior | Marco,
To have 100% standard behavior on GETs please replace all the code in Class TGet that follows:
case nKey >= 32 .and. nKey < 256
with
return nil
but the problem is that then we loose Clipper GETs compatibility. We need to find a way to make them compatible there. |
non-standard behavior | Ok, I think I have the right solution:
We are going to implement a new Class TEdit that uses a standard Windows Edit control with no related Clipper/Harbour GET at all, this way everything will be fine: Unicode support, etc <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
non-standard behavior | <!-- 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 --> <!-- 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 --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
non-standard behavior | [quote="Antonio Linares":1hothsev]Ok, I think I have the right solution:
We are going to implement a new Class TEdit that uses a standard Windows Edit control with no related Clipper/Harbour GET at all, this way everything will be fine: Unicode support, etc <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:1hothsev]
Sounds good. Long time ago, I suggestion it for Chinese input within Winxp Themes and Unicode.
FWH need TEdit Class for Windows Edit control. Some develop tools( MiniGUI, Xailer..) had it. |
non-standard behavior | Well, in fact it is already available and included in FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
FWH\source\classes\edit.prg
and an example:
samples\testedit.prg |
non-standard behavior | [quote="Antonio Linares":3o8746lr]Well, in fact it is already available and included in FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
FWH\source\classes\edit.prg
and an example:
samples\testedit.prg[/quote:3o8746lr]
Yes, right. But not work for Chinese get.
I use Minigui sample, I can input Chinese character within themes and not modify TEdit source code. But can't input Unicode.
FWH sample, I can input Chinese character without themes and modify TGet source code. But can't input Unicode.
I hope FWH TEdit can do two thing( themes, Unicode ) |
none PIXEL calculation | hi,
how to "calculate"
[code=fw:w5ti35oq]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span></div>[/code:w5ti35oq]
to use PIXEL Option <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
none PIXEL calculation | Is that what you mean ?
GetTextWidth(NIL, "calculate", oFont:hFont) |
none PIXEL calculation | Dear Jimmy,
@ 200, 200 SAY ... PIXEL
Not sure what you mean |
none PIXEL calculation | hi Antonio,
[quote="Antonio Linares":389vod8l][code=fw:389vod8l]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">200</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">SAY</span> ... <span style="color: #0000ff;">PIXEL</span></div>[/code:389vod8l][/quote:389vod8l]
thx for Answer
so
[code=fw:389vod8l]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">0.01</span>, <span style="color: #000000;">0.01</span> <span style="color: #0000ff;">SAY</span> ...</div>[/code:389vod8l]
are same as
[code=fw:389vod8l]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> ... <span style="color: #0000ff;">PIXEL</span></div>[/code:389vod8l]
100 : 1 that is easy |
none PIXEL calculation | Dear Jimmy,
It was just an example. Here you have the values that FWH really uses:
FWH\include\constant.ch |
none PIXEL calculation | hi Antonio,
[quote="Antonio Linares":2wci0hks]FWH\include\constant.ch[/quote:2wci0hks]
ok, now understand
it depend on Control which *_CHARPIX_H and *_CHARPIX_W to use
[code=fw:2wci0hks]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Say</span><br /><span style="color: #00D7D7;">#define</span> SAY_CHARPIX_H <span style="color: #000000;">15</span><br /><span style="color: #00D7D7;">#define</span> SAY_CHARPIX_W <span style="color: #000000;">6</span></div>[/code:2wci0hks]
so
[code=fw:2wci0hks]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span></div>[/code:2wci0hks]
are
[code=fw:2wci0hks]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">1</span>*SAY_CHARPIX_W, <span style="color: #000000;">2</span>*SAY_CHARPIX_H <span style="color: #0000ff;">SAY</span> ... <span style="color: #0000ff;">PIXEL</span></div>[/code:2wci0hks]
right <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
none PIXEL calculation | correct! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
not ISOEM() ISANSI() or IsUTF8() | hi,
i do try get String from DBF FIELD Type "C"
[code=fw:2kix0xrf]<div class="fw" id="{CB}" style="font-family: monospace;"> xValue := FieldGet<span style="color: #000000;">(</span>ii<span style="color: #000000;">)</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></div>[/code:2kix0xrf]
than i "test" for ISOEM(), ISANSI() or IsUTF8()
[code=fw:2kix0xrf]<div class="fw" id="{CB}" style="font-family: monospace;"> <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> .or. cType = <span style="color: #ff0000;">"M"</span><br /> <span style="color: #00C800;">IF</span> ISOEM<span style="color: #000000;">(</span>xValue<span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// OEM</span><br /> ELSEIF ISANSI<span style="color: #000000;">(</span>xValue<span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// ANSI </span><br /> ELSEIF IsUTF8<span style="color: #000000;">(</span>xValue<span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// UTF8</span><br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #B900B9;">// what Type is "this" ? </span><br /> <span style="color: #00C800;">ENDIF</span></div>[/code:2kix0xrf]
it "seems" that i got :
[quote:2kix0xrf]
ISOEM() when have "äöü ÄÖÜ"
ISANSI() when have "ß"
i never get IsUTF8
but get a lot "ELSE" (no "Umlaute")[/quote:2kix0xrf]
so what Type is it when got "ELSE" <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
---
DBF was open with CODEPAGE, hb_cdpSelect() "DE850" / "DEWIN" and FW_SetUnicode() .T./.F. |
not ISOEM() ISANSI() or IsUTF8() | We need to keep this in mind.
While all English characters and all characters of other West European languages other than accented characters are represented by a single byte in both ANSI and UTF8 notiation, the accented characters (which include German Umlauts) are represented by a single byte in ANSI and two bytes in UTF8.
Let us consider the example of "ü".
Is it ANSI or UTF8?
We can not say just by looking at it on the screen or in print.
Depends on how this string is encoded. We can find out its encoding by testing with IsUtf8() or still better, with STRTOHEX( c )
The same character is encoded as hex "FC" in ANSI and encoded as hex "C3BC" in UTF8.
When FWH displays, both look exacty alike and in fact both represent the same character.
But both are different. When compared, both are not equal and also we can not concatenate both the strings.
Nothing to do with FW_SetUnicode() and nothing to do with any Codepage
To see the point clearly, let is try this sample.
[code=fw:2g5g3wng]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br />#xtranslate enc<span style="color: #000000;">(</span> <c> <span style="color: #000000;">)</span> => <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsUtf8<span style="color: #000000;">(</span> <c> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"UTF8"</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsAnsi<span style="color: #000000;">(</span> <c> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"ANSI"</span>, <span style="color: #ff0000;">"???"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</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> cAnsi, cUtf8, cOem<br /><br /> FW_SetUnicode<span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// does not matter</span><br /><br /> cAnsi := Chr<span style="color: #000000;">(</span> 0xFC <span style="color: #000000;">)</span><br /> cUtf8 := HEXTOSTR<span style="color: #000000;">(</span> <span style="color: #ff0000;">"C3BC"</span> <span style="color: #000000;">)</span><br /><br /> ? cAnsi, enc<span style="color: #000000;">(</span> cAnsi <span style="color: #000000;">)</span> <span style="color: #B900B9;">// ü, ANSI</span><br /> ? cUtf8, enc<span style="color: #000000;">(</span> cUtf8 <span style="color: #000000;">)</span> <span style="color: #B900B9;">// ü, UTF8</span><br /> ? cAnsi == cUtf8 <span style="color: #B900B9;">// --> .F.</span><br /> ? cAnsi + cUtf8, enc<span style="color: #000000;">(</span> cAnsi + cUtf8 <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> üü, ANSI</span><br /><br /> <span style="color: #B900B9;">// TEST WITH DBF</span><br /> <span style="color: #B900B9;">// FW_SetUnicode( .f. ), NO CODEPAGE</span><br /><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UM.DBF"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FANSI"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FUTF8"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #ff0000;">"DBFCDX"</span>, .T., <span style="color: #ff0000;">"UM"</span> <span style="color: #000000;">)</span><br /> FW_ArrayToDBF<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> Replicate<span style="color: #000000;">(</span> cAnsi, <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>, ;<br /> Replicate<span style="color: #000000;">(</span> cUtf8, <span style="color: #000000;">5</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> GO TOP<br /><br /> ? enc<span style="color: #000000;">(</span> FieldGet<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> ANSI</span><br /> ? enc<span style="color: #000000;">(</span> FieldGet<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> UTF8</span><br /> <span style="color: #B900B9;">// But when we see, both look alike</span><br /><br /> XBROWSER <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> COLUMNS <span style="color: #ff0000;">"FANSI"</span>, <span style="color: #ff0000;">"FUTF8"</span>, ;<br /> <span style="color: #ff0000;">"STRTOHEX(TRIM(FANSI)) AS HEXANSI"</span>, ;<br /> <span style="color: #ff0000;">"STRTOHEX(TRIM(FUTF8)) AS HEXUTF8"</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2g5g3wng]
In the xbrowse we see both the strings as same and when we print also both the strings are same (because FWH handles both ANSI and UTF8, transparently) but with Excel it is different.
[url=https://imageshack.com/i/pmaO9vE8p:2g5g3wng][img:2g5g3wng]https://imagizer.imageshack.com/v2/xq70/922/aO9vE8.png[/img:2g5g3wng][/url:2g5g3wng]
[url=https://imageshack.com/i/pnDH5Bzop:2g5g3wng][img:2g5g3wng]https://imagizer.imageshack.com/v2/xq70/923/DH5Bzo.png[/img:2g5g3wng][/url:2g5g3wng]
We are proposing to initiate a full length discussion on this subject separately very soon. |
not ISOEM() ISANSI() or IsUTF8() | hi,
thx for Andwer.
it was not the Problem when "hardcode" using UTF8-Editor and not when create a "new" DBF
it was from some (40 Year old) DBF, start with 7-Bit C/PM under Dbase ]} over. Dbase III+. Cli*pper, Xbase++, HMG and now Fivewin
these DBF (still) have OEM "Umlaute" not ANSI "Umlaute"
but there is no OEMtoUTF8() Function in FiveWin, or <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: -->
i have try these OEM
[code=fw:2geb5i5z]<div class="fw" id="{CB}" style="font-family: monospace;"> <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></div>[/code:2geb5i5z]
these are value from "old" DOS Style but seems not to have right Effect
using Windows Notepad i have create in ANSI
[code=fw:2geb5i5z]<div class="fw" id="{CB}" style="font-family: monospace;">#ifdef Use_ANSI<br /> cText := STRTRAN<span style="color: #000000;">(</span> cIn, <span style="color: #ff0000;">"ä"</span>, <span style="color: #ff0000;">"ae"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"ö"</span>, <span style="color: #ff0000;">"oe"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"ü"</span>, <span style="color: #ff0000;">"ue"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"ß"</span>, <span style="color: #ff0000;">"ss"</span> <span style="color: #000000;">)</span><br /><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"Ä"</span>, <span style="color: #ff0000;">"Ae"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"Ö"</span>, <span style="color: #ff0000;">"Oe"</span> <span style="color: #000000;">)</span><br /> cText := STRTRAN<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"Ü"</span>, <span style="color: #ff0000;">"Ue"</span> <span style="color: #000000;">)</span><br />#endif<br /> </div>[/code:2geb5i5z]but it also "fail" when "open" *.XLSX ... all Type "C" are missing
i end up in UTF8 using Notepad++ as UTF8 Editor
[code=fw:2geb5i5z]<div class="fw" id="{CB}" style="font-family: monospace;">#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></div>[/code:2geb5i5z]
This CODE made under UTF8 and work now as i need for those "old" Style OEM DBF with XLSwriter
here my full German OEM (DE850) "translate" for UTF8 Editor
[quote:2geb5i5z]cSign = "ä" ASC( cSign ) = 228
cSign = "ö" ASC( cSign ) = 246
cSign = "ü" ASC( cSign ) = 252
cSign = "Ä" ASC( cSign ) = 196
cSign = "Ö" ASC( cSign ) = 214
cSign = "Ü" ASC( cSign ) = 220
cSign = "ß" ASC( cSign ) = 223 [/quote:2geb5i5z]
---
i have add some "counter" in DO CASE
[quote:2geb5i5z]nOEM = 107712 nANSI = 17642 nELSE = 5821450 [/quote:2geb5i5z]
for nOEM or nANSI i need to "translate" Type "C" but not for nELSE = 5821450 whichh are 99,98 % |
not ISOEM() ISANSI() or IsUTF8() | Mr. Jimmy
Sorry.
Now I understand.
By the way you remind me of programming with CP/M (8-bit) those days.
[quote:348kn0wf]
but there is no OEMtoUTF8() Function in FiveWin, or <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: -->
[/quote:348kn0wf]
But we have OEMtoANSI() function. Is it useful for conerting German Umlauts to ANSI?
Once we convert to ANSI, we can easily convert to UTF8 and we discussed this in the other thread.
[quote:348kn0wf]
This CODE made under UTF8 and work now as i need for those "old" Style OEM DBF with XLSwriter
[/quote:348kn0wf]
That is nice. So are you able to finally solve the conversion issue?
If you don't mind, I like to ask you some help purely for my knowledge and educational purpose.
Can you please post some OEM strings here in Hex?
[code=fw:348kn0wf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cTextOEM := FieldGet<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br />cTextHex := STRTOHEX<span style="color: #000000;">(</span> cTextOEM <span style="color: #000000;">)</span><br /> </div>[/code:348kn0wf]
and please post the hex string. A few strings like that.
I am not sure if I can do, but would like to try to convert to Ansi.
if that is ok with you. |
not ISOEM() ISANSI() or IsUTF8() | hi,
forgot to say that Xbase++ still use default OEM Setting <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
Xbase++ use OEM <-> ANSI "translation" internal "on-fly"
to use Xbase++ with ANSI you need to compile with -a |
not ISOEM() ISANSI() or IsUTF8() | hi,
[quote="nageswaragunupudi":vkj8b1yc]That is nice. So are you able to finally solve the conversion issue?[/quote:vkj8b1yc]
Yes, after STRTRAN() "Umlaute" and use this CODE to "check" Sign
[code=fw:vkj8b1yc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> CheckValue<span style="color: #000000;">(</span> xValue, lNoCheck <span style="color: #000000;">)</span><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 /><span style="color: #00C800;">DEFAULT</span> lNoCheck := .F.<br /><br />#ifdef Use_UTF8_Sign <span style="color: #B900B9;">// NEED UTF8 Edtitor</span><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, RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><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</div>[/code:vkj8b1yc]
[quote="nageswaragunupudi":vkj8b1yc]
If you don't mind, I like to ask you some help purely for my knowledge and educational purpose.
Can you please post some OEM strings here in Hex?
[code=fw:vkj8b1yc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cTextOEM := FieldGet<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br />cTextHex := STRTOHEX<span style="color: #000000;">(</span> cTextOEM <span style="color: #000000;">)</span><br /> </div>[/code:vkj8b1yc]
and please post the hex string. A few strings like that.
I am not sure if I can do, but would like to try to convert to Ansi.
if that is ok with you.[/quote:vkj8b1yc]
ok i will use STRTOHEX instead of ASC() |
not ISOEM() ISANSI() or IsUTF8() | hi,
this i got when have use DBU and fill it with German Umlaute
[quote:199s4d2e]xValue = "ä" STRTOHEX(xValue) = "84" ASC(xValue) = 132
xValue = "ö" STRTOHEX(xValue) = "94" ASC(xValue) = 148
xValue = "ü" STRTOHEX(xValue) = "81" ASC(xValue) = 129
xValue = "Ä" STRTOHEX(xValue) = "8E" ASC(xValue) = 142
xValue = "Ö" STRTOHEX(xValue) = "99" ASC(xValue) = 153
xValue = "Ü" STRTOHEX(xValue) = "9A" ASC(xValue) = 154
xValue = "ß" STRTOHEX(xValue) = "E1" ASC(xValue) = 225 [/quote:199s4d2e]
i need UTF8 Value which i get this Way
[code=fw:199s4d2e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> Use_OEM<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</div>[/code:199s4d2e] |
not ISOEM() ISANSI() or IsUTF8() | [code=fw:uiuhwbs2]<div class="fw" id="{CB}" style="font-family: monospace;">OemToAnsi<span style="color: #000000;">(</span> cOem <span style="color: #000000;">)</span> --> cAnsi</div>[/code:uiuhwbs2]
seems to function perfectly and much simpler to use.
We can also convert from Ansi to Utf8 as explained earlier |
not ISOEM() ISANSI() or IsUTF8() | I made a simple test by first creating a small dbf with 2 fields and 10 records all containing random OEM strings of Umlauts.
This is the code:
[code=fw:18yw9gqr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> field FLD1, FLD2<br /> <span style="color: #00C800;">local</span> aoem := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"84"</span>, <span style="color: #ff0000;">"94"</span>, <span style="color: #ff0000;">"81"</span>, <span style="color: #ff0000;">"8E"</span>, <span style="color: #ff0000;">"99"</span>, <span style="color: #ff0000;">"9A"</span>, <span style="color: #ff0000;">"E1"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #B900B9;">// STEP-1: Create DBF with OEM Umlaut chars</span><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\s</span>amples<span style="color: #000000;">\U</span>MLOEM.DBF"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FLD1"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FLD2"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, <span style="color: #ff0000;">"DBFNTX"</span>, .T., <span style="color: #ff0000;">"UML"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span><br /> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> aoem := AShuffle<span style="color: #000000;">(</span> aoem <span style="color: #000000;">)</span><br /> FLD1 := HEXTOSTR<span style="color: #000000;">(</span> FW_ArrayAsList<span style="color: #000000;">(</span> aoem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> aoem := AShuffle<span style="color: #000000;">(</span> aoem <span style="color: #000000;">)</span><br /> FLD2 := HEXTOSTR<span style="color: #000000;">(</span> FW_ArrayAsList<span style="color: #000000;">(</span> aoem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">next</span><br /> CLOSE <span style="color: #00C800;">DATA</span><br /> </div>[/code:18yw9gqr]
We know it is easy to view OEM characters from DOS prompt.
I used a DBEDIT uitily I have with me to view this OEM data in Command Window.
This is the code;
[code=fw:18yw9gqr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> WaitRun<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\s</span>amples<span style="color: #000000;">\d</span>bedit32c <span style="color: #000000;">\f</span>wh<span style="color: #000000;">\s</span>amples<span style="color: #000000;">\u</span>mloem.dbf"</span> <span style="color: #000000;">)</span><br /> </div>[/code:18yw9gqr]
This is the result and we are sure that the data is OEM and we can view them from a harbour program run in command window.
[url=https://imageshack.com/i/pobgfpPNp:18yw9gqr][img:18yw9gqr]https://imagizer.imageshack.com/v2/xq70/924/bgfpPN.png[/img:18yw9gqr][/url:18yw9gqr]
Now XBrowse also can display OEM data by converting to ANSI, if we set oBrw:lOemAnsi := .t.. If we want this conversion only for some columns but not all, we can set oCol:lOemAnsi := .t. for the required columns instead of setting for the entire browse. Not only display but we can also edit.
When displaying the data XBrowse converts the data from OEM to ANSI and displays. If the user modifies the data though inline edit and save the changes, then XBrowse will convert ANSI to OEM and saves the data. So, the DBF continues to be OEM.
oBrw:Report() and oBrw:ToExcell() also work perfectly using ANSI converted data.
Now, we will try to view the OEM dbf with XBrowse
[code=fw:18yw9gqr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> XBROWSER <span style="color: #ff0000;">"<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\U</span>MLOEM.DBF"</span> SETUP <span style="color: #000000;">(</span> ;<br /> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t., oBrw:<span style="color: #000000;">nWidths</span> := <span style="color: #000000;">80</span> <span style="color: #000000;">)</span><br /> </div>[/code:18yw9gqr]
[url=https://imageshack.com/i/poE2St57p:18yw9gqr][img:18yw9gqr]https://imagizer.imageshack.com/v2/xq70/924/E2St57.png[/img:18yw9gqr][/url:18yw9gqr]
Finally we will convert to OEM DBF to ANSI DBF and we can then keep aside the OEM dbf and start using the ANSI DBF
[code=fw:18yw9gqr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> USE \FWH\SAMPLES\UMLOEM VIA <span style="color: #ff0000;">"DBFNTX"</span><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\U</span>MLANSI.DBF"</span>, DBSTRUCT<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"DBFNTX"</span>, .T., <span style="color: #ff0000;">"UMLA"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">SELECT</span> UMLOEM<br /> DBEVAL<span style="color: #000000;">(</span> <||<br /> UMLA-><span style="color: #000000;">(</span> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> UMLA->FLD1 := OEMTOANSI<span style="color: #000000;">(</span> UMLOEM->FLD1 <span style="color: #000000;">)</span><br /> UMLA->FLD2 := OEMTOANSI<span style="color: #000000;">(</span> UMLOEM->FLD2 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> > <span style="color: #000000;">)</span><br /> CLOSE <span style="color: #00C800;">DATA</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;">\U</span>MLANSI.DBF"</span> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">nWidths</span> := <span style="color: #000000;">80</span> <span style="color: #000000;">)</span><br /> </div>[/code:18yw9gqr]
[url=https://imageshack.com/i/pmcGoC6Ap:18yw9gqr][img:18yw9gqr]https://imagizer.imageshack.com/v2/xq70/922/cGoC6A.png[/img:18yw9gqr][/url:18yw9gqr]
This is the full program
[code=fw:18yw9gqr]<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 /> field FLD1, FLD2<br /> <span style="color: #00C800;">local</span> aoem := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"84"</span>, <span style="color: #ff0000;">"94"</span>, <span style="color: #ff0000;">"81"</span>, <span style="color: #ff0000;">"8E"</span>, <span style="color: #ff0000;">"99"</span>, <span style="color: #ff0000;">"9A"</span>, <span style="color: #ff0000;">"E1"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #B900B9;">// STEP-1: Create DBF with OEM Umlaut chars</span><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\s</span>amples<span style="color: #000000;">\U</span>MLOEM.DBF"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FLD1"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FLD2"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, <span style="color: #ff0000;">"DBFNTX"</span>, .T., <span style="color: #ff0000;">"UML"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span><br /> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> aoem := AShuffle<span style="color: #000000;">(</span> aoem <span style="color: #000000;">)</span><br /> FLD1 := HEXTOSTR<span style="color: #000000;">(</span> FW_ArrayAsList<span style="color: #000000;">(</span> aoem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> aoem := AShuffle<span style="color: #000000;">(</span> aoem <span style="color: #000000;">)</span><br /> FLD2 := HEXTOSTR<span style="color: #000000;">(</span> FW_ArrayAsList<span style="color: #000000;">(</span> aoem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">next</span><br /> CLOSE <span style="color: #00C800;">DATA</span><br /><br /> <span style="color: #B900B9;">// STEP-2</span><br /> <span style="color: #B900B9;">// View it from DOS-PROMPT with DBEDIT</span><br /> <span style="color: #B900B9;">// We can browse only OEM data in DOS prompt</span><br /> <span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// WaitRun( "\fwh\samples\dbedit32c \fwh\samples\umloem.dbf" )</span><br /> <span style="color: #B900B9;">// This works only for me. You may please comment it our</span><br /><br /><br /> <span style="color: #B900B9;">// STEP-3: XBrowse OEM data using oBrw:lOemAnsi</span><br /> XBROWSER <span style="color: #ff0000;">"<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\U</span>MLOEM.DBF"</span> SETUP <span style="color: #000000;">(</span> ;<br /> oBrw:<span style="color: #000000;">lOemAnsi</span> := .t., oBrw:<span style="color: #000000;">nWidths</span> := <span style="color: #000000;">80</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// STEP-4</span><br /> <span style="color: #B900B9;">// CONVERT UMLOEM.DBF TO UMLANSI.DBF ONCE AND FOR ALL</span><br /> <span style="color: #B900B9;">// AND FORGET ABOUT OEM</span><br /><br /> USE \FWH\SAMPLES\UMLOEM VIA <span style="color: #ff0000;">"DBFNTX"</span><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\U</span>MLANSI.DBF"</span>, DBSTRUCT<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"DBFNTX"</span>, .T., <span style="color: #ff0000;">"UMLA"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">SELECT</span> UMLOEM<br /> DBEVAL<span style="color: #000000;">(</span> <||<br /> UMLA-><span style="color: #000000;">(</span> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> UMLA->FLD1 := OEMTOANSI<span style="color: #000000;">(</span> UMLOEM->FLD1 <span style="color: #000000;">)</span><br /> UMLA->FLD2 := OEMTOANSI<span style="color: #000000;">(</span> UMLOEM->FLD2 <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> > <span style="color: #000000;">)</span><br /> CLOSE <span style="color: #00C800;">DATA</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;">\U</span>MLANSI.DBF"</span> SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">nWidths</span> := <span style="color: #000000;">80</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// Now, we can keep the OEM dbf in a safe place</span><br /> <span style="color: #B900B9;">// stop using it and start using UMLANSI.DBF in its place</span><br /> <span style="color: #B900B9;">// from now onwards</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:18yw9gqr]
NOTES: NO UNICODE and NO CODEPAGE
Please keep it simple for this Test
===========================
But the problem with the DBF of Mr. Jimmy is not as simple as this.
We again come back to first question he raised.
If we know the text is OEM, we can use OemToAnsi.
But what if ISOEM( cText ) is .F. and also ISANSI( cText ) is .F.?
This involves more complex work.
I think (I may not be right) first let us convert all values where ISOEM( value ) == .t. to ANSI
and later handle values which are not ISANSI(), character by character.
The is problem is interesting. |
not ISOEM() ISANSI() or IsUTF8() | Another way to convert Umlaut OEM to ANSI and UTF8
[code=fw:24gjbvxw]<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 := HEXTOSTR<span style="color: #000000;">(</span> cOemHex <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cAnsiText, cUtf8Text<br /><br /> cAnsiText := UML_OEMTOANSI<span style="color: #000000;">(</span> cOemText <span style="color: #000000;">)</span><br /> ? cAnsiText, Len<span style="color: #000000;">(</span> cAnsiText <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// no proble, even if we input ANSI by mistake</span><br /> cAnsiText := UML_OEMTOANSI<span style="color: #000000;">(</span> cAnsiText <span style="color: #000000;">)</span><br /> ? cAnsiText, Len<span style="color: #000000;">(</span> cAnsiText <span style="color: #000000;">)</span><br /><br /> cUtf8Text := UTF16toUTF8<span style="color: #000000;">(</span> strtoWide<span style="color: #000000;">(</span> cAnsiText <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> ? cUtf8Text, STRTOHEX<span style="color: #000000;">(</span> cUtf8Text <span style="color: #000000;">)</span>, Len<span style="color: #000000;">(</span> cUtf8Text <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 /><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:24gjbvxw] |
not ISOEM() ISANSI() or IsUTF8() | hi,
thx for your Sample
i have try OemToAnsi() before and now also UML_OemToAnsi() ... but this is not the Problem
i have disable
[code=fw:1sj556ur]<div class="fw" id="{CB}" style="font-family: monospace;">* 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 />USE <span style="color: #000000;">(</span>cDBF<span style="color: #000000;">)</span> <span style="color: #B900B9;">// CODEPAGE cCodepage EXCLUSIVE</span></div>[/code:1sj556ur]
now please try to "export" to Excel using DrXlsx, NOT XBROWSE
i like to get a working Excel Sheet with German "Umlaute" using DrXlsx
---
when you ask me for STRTOHEX() i got
[quote:1sj556ur]xValue = "„" STRTOHEX(xValue) = "84" ASC(xValue) = 132
xValue = "”" STRTOHEX(xValue) = "94" ASC(xValue) = 148
xValue = "" STRTOHEX(xValue) = "81" ASC(xValue) = 129
xValue = "Ž" STRTOHEX(xValue) = "8E" ASC(xValue) = 142
xValue = "™" STRTOHEX(xValue) = "99" ASC(xValue) = 153
xValue = "š" STRTOHEX(xValue) = "9A" ASC(xValue) = 154
xValue = "á" STRTOHEX(xValue) = "E1" ASC(xValue) = 225[/quote:1sj556ur]
but for DrXlsx i need UTF8 so these Value
[quote:1sj556ur]cSign = "ä" STRTOHEX( cSign ) = "E4" ASC( cSign ) = 228
cSign = "ö" STRTOHEX( cSign ) = "F6" ASC( cSign ) = 246
cSign = "ü" STRTOHEX( cSign ) = "FC" ASC( cSign ) = 252
cSign = "Ä" STRTOHEX( cSign ) = "C4" ASC( cSign ) = 196
cSign = "Ö" STRTOHEX( cSign ) = "D6" ASC( cSign ) = 214
cSign = "Ü" STRTOHEX( cSign ) = "DC" ASC( cSign ) = 220
cSign = "ß" STRTOHEX( cSign ) = "DF" ASC( cSign ) = 223[/quote:1sj556ur]
so what i need is OEMtoUTF8()
[code=fw:1sj556ur]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">132</span> -> <span style="color: #000000;">228</span><br /><span style="color: #000000;">148</span> -> <span style="color: #000000;">246</span><br /><span style="color: #000000;">129</span> -> <span style="color: #000000;">252</span><br /><span style="color: #000000;">142</span> -> <span style="color: #000000;">196</span><br /><span style="color: #000000;">153</span> -> <span style="color: #000000;">214</span><br /><span style="color: #000000;">154</span> -> <span style="color: #000000;">220</span><br /><span style="color: #000000;">225</span> -> <span style="color: #000000;">223</span></div>[/code:1sj556ur] |
not ISOEM() ISANSI() or IsUTF8() | [quote:1iszlr7d]i like to get a working Excel Sheet with German "Umlaute" using DrXlsx
[/quote:1iszlr7d]
Suggested:
OEM -> ANSI -> UTF8
For ansi to utf8
[code=fw:1iszlr7d]<div class="fw" id="{CB}" style="font-family: monospace;">UTF16toUTF8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> cAnsi <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:1iszlr7d]
So we can use:
[code=fw:1iszlr7d]<div class="fw" id="{CB}" style="font-family: monospace;">UTF16toUTF8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> UML_OEMTOANSI<span style="color: #000000;">(</span> fieldGet<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:1iszlr7d]
Please use UML_OEMTOANSI() but not OemToAnsi() |
not ISOEM() ISANSI() or IsUTF8() | We can also make all this in a single function.
For that can you provide me a list of ALL accented characters in German language?
Not only the 7 chars. We need all chars.
For example, there are other chars like: Ûúùõòóô, etc. |
not ISOEM() ISANSI() or IsUTF8() | Next point, in the next Version, FWH will be providing DBFTOXLSX using DrXlsx. This function will automatically take care of ANSI to UTF8 conversion. |
not ISOEM() ISANSI() or IsUTF8() | hi,
[quote="nageswaragunupudi":gsonxh1j]
Suggested:
OEM -> ANSI -> UTF8
So we can use:
[code=fw:gsonxh1j]<div class="fw" id="{CB}" style="font-family: monospace;">UTF16toUTF8<span style="color: #000000;">(</span> strToWide<span style="color: #000000;">(</span> UML_OEMTOANSI<span style="color: #000000;">(</span> fieldGet<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:gsonxh1j]
Please use UML_OEMTOANSI() but not OemToAnsi()[/quote:gsonxh1j]
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: -->
---
i have compare
[code=fw:gsonxh1j]<div class="fw" id="{CB}" style="font-family: monospace;"> cText := 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></div>[/code:gsonxh1j]
vs.
[code=fw:gsonxh1j]<div class="fw" id="{CB}" style="font-family: monospace;">#ifdef Use_UTF8_Sign<br /> <span style="color: #B900B9;">// using UTF8-Editor</span><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 /> 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</div>[/code:gsonxh1j]
both "seems" to be same (!) even HEX are same
so i don´t understand why UTF16toUTF8( strToWide( UML_OEMTOANSI())) did not work to create "right" Excel Sheet |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.