Page 1 of 1
HB_SetCodePage( "PT850" )
Posted: Wed Nov 28, 2018 4:57 pm
by susviela
Where is the error?
------------------------------
Desculpe el español :
Me apresenta caracteres con error ( HMG 3.4.4 / Unicode ) con el seguinte codigo.
Code: Select all
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
HB_SetCodePage( "PT850" )
HB_LANGSELECT("PT")
- Error
- W64-HMG-MariaDB.png (4.26 KiB) Viewed 1727 times
Re: HB_SetCodePage( "PT850" )
Posted: Wed Nov 28, 2018 5:37 pm
by mustafa
Hola amigo susviela
Prueba , haber si funciona
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
HB_SetCodePage( "PT850" )
HB_LANGSELECT("PT")
Añade
SET CODEPAGE TO UNICODE
salva el Prg como "UTF-8"
Saludos
Mustafa
*-----------------------------------------------------------------*
Olá meu amigo
Teste, se funcionar
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
HB_SetCodePage( "PT850" )
HB_LANGSELECT("PT")
Adicionar
SET CODEPAGE TO UNICODE
Salve o Prg como "UTF-8"
Saudações
Mustafa
Re: HB_SetCodePage( "PT850" )
Posted: Wed Nov 28, 2018 6:00 pm
by susviela
Gracias por contestar y esto funciona pero em
SET CODEPAGE TO UNICODE
me produz error em una rutina de criptografia donde uso ASC() / CHR()
me clarea una cosa ahora .. voi a probar colocar los calculos entre :
HB_SetCodePage( "PT850" )
..
..
..
SET CODEPAGE TO UNICODE
Re: HB_SetCodePage( "PT850" )
Posted: Wed Nov 28, 2018 7:51 pm
by mustafa
Mira
http://www.hmgforum.com/viewtopic.php?f ... 6&start=10
el programa CFANS2UT8.rar de serge_girard
te hará la conversión
vai fazer você a conversão
Saludos
Mustafa
Re: HB_SetCodePage( "PT850" )
Posted: Wed Nov 28, 2018 9:12 pm
by susviela
Eita que esse troço de UNICODE / UTF8 é complicado mas .. ta resolvido ...
Una dica el CODEPAGE default do HMG 3.4.4 é UTF8.
entonces: SET CODEPAGE TO UNICODE / hb_cdpSelect( "UTF8" ) - no es necessario, a menos que usted pretenda cambiar esto.
Testar con: msginfo( HB_SetCodePage() )
------------------------
Unas pesquisas y encontre estas funcion:
hb_UTF8ToStr()
hb_StrToUTF8()
- HB_UCODE ( cUnicodeCharacter ) --> Return nCode / ASC
- HB_UCHAR ( nCode ) --> Return cUnicodeCharacter / CHR
hb_StrToUtf8( sData, sCodepageIN ) Translation sData of sCodepageIN in utf8
hb_Utf8ToStr( sData, sCodepageOUT ) Translation sData from utf8 to sCodepageOUT
hb_Utf8Len( sData ) This and the following functions are analogs of
hb_utf8Chr( n ) the standard string functions Len(),
hb_utf8Asc( sData ) Chr(), Asc (), etc., but for rows in a
hb_utf8Substr( sData, n1, n2 ) utf8 encoding. As it is known, in utf8
hb_utf8Left( sData, n1 ) one character may be encoded with more
hb_utf8Right( sData, n1 ) than one byte. These functions operate with
hb_utf8Stuff( sData, n1, n2, cNew ) the number of symbols rather than bytes.
hb_utf8Peek( sData, n1 )
hb_utf8Poke( sData, n1, n )