mustafa wrote:Hola Mol
Curiosamente si pones:
@ 210,100 LABEL Label_c VALUE "ampersand "+ chr(038) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
solo sale ------------> ampersand , no sale simbolo &
pero si pones:
@ 310,100 LABEL Label_d VALUE "ampersand "+"&" + chr(038) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
sale correcto --------> ampersand &
Guardado fichero con UTF-8
Curioso
Mustafa
*-------------------------------------------------*
Hello Mol
Interestingly if you put:
@ 210,100 Label_c LABEL VALUE "ampersand" + chr (038) 290 HEIGHT 25 WIDTH FONT "ARIAL" SIZE 14
only goes ------------> ampersand, no sale symbol &
but if you put:
@ 310.100 Label_d LABEL VALUE "ampersand" + "&" + chr (038) 290 HEIGHT 25 WIDTH FONT "ARIAL" SIZE 14
goes right ampersand &
save file with UTF-8
curious
Mustafa
Amigo Mustafa,
Para mostrar caracteres en Unicode debes reemplar CHR() y ASC() por:
Hola amigo Claudio, como estas ?
gracias por el ejemplo, pero no entiendo mucho la respuesta como aplico
tu sample al Label ? le pongo
SET CODEPAGE TO UNICODE
nCode:=HB_UCODE("&") , HB_UCHAR(nCode)
@ 310.100 Label_d LABEL VALUE nCode 290 HEIGHT 25 WIDTH FONT "ARIAL" SIZE 14
me da Error y otra cosa que no entiendo, el fichero lo guardo con UTF-8 ? porque si
guardo con Unicode me da Error
Mustafa
mustafa wrote:Hola amigo Claudio, como estas ?
gracias por el ejemplo, pero no entiendo mucho la respuesta como aplico
tu sample al Label ? le pongo
SET CODEPAGE TO UNICODE
nCode:=HB_UCODE("&") , HB_UCHAR(nCode)
@ 310.100 Label_d LABEL VALUE nCode 290 HEIGHT 25 WIDTH FONT "ARIAL" SIZE 14
me da Error y otra cosa que no entiendo, el fichero lo guardo con UTF-8 ? porque si
guardo con Unicode me da Error
Mustafa
Hola Mustafa, yo me encuentro bien, espero que tu y tu familia también.
SET CODEPAGE TO UNICODE
nCode:=HB_UCODE("&") // Devuelve el código (numero) Unicode del caracter "&"
@ 210,100 Label_c LABEL VALUE "ampersand" + HB_UCHAR(nCode) 290 HEIGHT 25 WIDTH FONT "ARIAL" SIZE 14
HB_UCODE() --> equivale a ASC() en ANSI
HB_UCHAR() --> equivale a CHR() en ANSI
Sí, el fichero lo guardas como UTF-8.
Un abrazo,
Claudio.
Hola Claudio
Intento hacerlo como tu me indicas pero al complilar no sale
el simbolo "&", no creo que sea no trabajar con el IDE,
trabajo con Build.bat --- > c:\hmg.3.2\build.bat Main %*
el codigo fuente es:
#include "hmg.ch"
Function Main
SET CODEPAGE TO UNICODE
DEFINE WINDOW Form_1;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE '' ;
MAIN
@ 050,100 LABEL Label_a VALUE "ampersand Antiguo "+"&" + chr(038) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
*** Para mostrar caracteres en Unicode debes reemplazar CHR() y ASC() por:
*----------------------------------------------------------------------*
SET CODEPAGE TO UNICODE
msgdebug ( nCode:=HB_UCODE("&") , HB_UCHAR(nCode)
*-----------------------------------------------------------------------*
SET CODEPAGE TO UNICODE
nCode:=HB_UCODE("&") // Devuelve el código (numero) Unicode del caracter "&"
@ 080,100 LABEL Label_b VALUE "ampersand Claudio " + HB_UCHAR(nCode) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
@ 110,100 LABEL Label_c VALUE "ampersand Mustafa " + "&" + HB_UCHAR(nCode) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return Nil
Guardado como UTF-8 con el Notepad
Un Saludo
Mustafa
mustafa wrote:
Hola Claudio
Intento hacerlo como tu me indicas pero al complilar no sale
el simbolo "&", no creo que sea no trabajar con el IDE,
trabajo con Build.bat --- > c:\hmg.3.2\build.bat Main %*
el codigo fuente es:
#include "hmg.ch"
Function Main
SET CODEPAGE TO UNICODE
DEFINE WINDOW Form_1;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE '' ;
MAIN
@ 050,100 LABEL Label_a VALUE "ampersand Antiguo "+"&" + chr(038) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
*** Para mostrar caracteres en Unicode debes reemplazar CHR() y ASC() por:
*----------------------------------------------------------------------*
SET CODEPAGE TO UNICODE
msgdebug ( nCode:=HB_UCODE("&") , HB_UCHAR(nCode)
*-----------------------------------------------------------------------*
SET CODEPAGE TO UNICODE
nCode:=HB_UCODE("&") // Devuelve el código (numero) Unicode del caracter "&"
@ 080,100 LABEL Label_b VALUE "ampersand Claudio " + HB_UCHAR(nCode) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
@ 110,100 LABEL Label_c VALUE "ampersand Mustafa " + "&" + HB_UCHAR(nCode) WIDTH 290 HEIGHT 25 FONT "ARIAL" SIZE 14
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return Nil
Guardado como UTF-8 con el Notepad
Un Saludo
Mustafa
I upgraded the idea of Esgici and made a little tool that do the real conversion to your program: replace all occurences of LEN() with HMG_LEN(), ASC() with HB_UCODE(), etc...
Maybe the UNICODE experts can take a look at it and tell me if it is correct.