// C:\FWH\SAMPLES\NAGESCHR.PRG
#include "FiveWin.ch"
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
FUNCTION Main()
HB_LANGSELECT( 'PT' ) // Default language is now Portuguese
// HB_SETCODEPAGE( "PT850" ) // NO FUNCIONA NI CON ASC(195) Increible.
// HB_CDPSELECT( "PTISO" )
// MsgInfo( "JO" + CHR(194) + "O" ) // Similar
MsgInfo( "JO" + CHR(195) + "O" ) // Correct: JOÃO - João
// MsgInfo( "JO" + CHR(196) + "O" ) // Similar
//-> 226, 227, 228, 229(similars)
MsgInfo( "Jo" + CHR(227) + "o" ) // Correct: JOÃO - João
MsgInfo( "M" + CHR(193) + "RIO" ) // Correct: MÁRIO - Mário
MsgInfo( "M" + CHR(225) + "rio" ) // Correct: MÁRIO - Mário
MsgInfo( "N" + CHR(193) + "GES" )
MsgInfo( "N" + CHR(225) + "ges" )
MsgInfo( "ELI" + CHR(201) + "ZER" ) // Correct: Eliézer
MsgInfo( "Eli" + CHR(233) + "zer" ) // Correct: Eliézer
MsgInfo( "ANT" + CHR(212) + "NIO" ) // Correct: Antônio Liñares Cañas
MsgInfo( "Ant" + CHR(244) + "nio" ) // Correct: Antônio Liñares Cañas
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
// C:\FWH\SAMPLES\NAGESCHR.PRG - Version 2 - CON "PTISO"
#include "FiveWin.ch"
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
REQUEST HB_CODEPAGE_PTISO
FUNCTION Main()
HB_LANGSELECT( 'PT' ) // Default language is now Portuguese
SET(_SET_CODEPAGE,"PT850")
SET(_SET_CODEPAGE,"PTISO")
// MsgInfo( HB_SetCodePage() ) // "PTISO"
// MsgInfo( "JO" + CHR(194) + "O" ) // Similar
MsgInfo( "JO" + CHR(195) + "O" ) // Correct: JOÃO - João
// MsgInfo( "JO" + CHR(196) + "O" ) // Similar
//-> 226, 227, 228, 229(similars)
MsgInfo( "Jo" + CHR(227) + "o" ) // Correct: JOÃO - João
MsgInfo( "M" + CHR(193) + "RIO" ) // Correct: MÁRIO - Mário
MsgInfo( "M" + CHR(225) + "rio" ) // Correct: MÁRIO - Mário
MsgInfo( "N" + CHR(193) + "GES" )
MsgInfo( "N" + CHR(225) + "ges" )
MsgInfo( "ELI" + CHR(201) + "ZER" ) // Correct: Eliézer
MsgInfo( "Eli" + CHR(233) + "zer" ) // Correct: Eliézer
MsgInfo( "ANT" + CHR(212) + "NIO" ) // Correct: Antônio Liñares Cañas
MsgInfo( "Ant" + CHR(244) + "nio" ) // Correct: Antônio Liñares Cañas
RETURN NIL
// FIN / END - kapiabafwh@gmail.com .and. jairfab@gmail.com
// C:\FWH\SAMPLES\NAGESCH3.PRG - Version 3 - CON "PTISO"
#include "FiveWin.ch"
REQUEST HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850
FUNCTION Main()
LOCAL cTexto := "MAÇÃ VERDE"
LOCAL cTexto2 := "MAۂ VERDE" // green apple - Modo consola.
SET(_SET_CODEPAGE,"PTISO") // MAÇÃ VERDE -> green apple
? "PTISO: ", cTexto, OemToAnsi( cTexto2 ) // Correct
SET(_SET_CODEPAGE,"CP437")
? "CP437: ", cTexto, OemToAnsi( cTexto2 ) // Correct
SET(_SET_CODEPAGE,"UTF8")
? "UTF8: ", cTexto, OemToAnsi( cTexto2 ) // Correct
SET(_SET_CODEPAGE,"CP850")
? "CP850: ", cTexto, OemToAnsi( cTexto2 ) // Correct
RETURN NIL
Simplemente no funciona con:
SET(_SET_CODEPAGE,"PT850")
// FIN / END - kapiabafwh@gmail.com .and. jairfab@gmail.com
As I said, the difference is between 2407 and 2409. Everything in my code, libraries, and compiler/linker is the same for both builds. It works in 07 but not 09.
METHOD New( nTop, nLeft, nBottom, nRight, oWnd, lDesign, cVarName, lBorder ) CLASS TPanel
DEFAULT nTop := 0, nLeft := 0, nBottom := 100, nRight := 100,;
oWnd := GetWndDefault(), lDesign := .F., lBorder := .F.
::lUnicode = FW_SetUnicode()
/*
::nTop = nTop
::nLeft = nLeft
::nBottom = nBottom
::nRight = nRight
*/
::oWnd = oWnd
METHOD New( nTop, nLeft, nBottom, nRight, oWnd, lDesign, cVarName, lBorder ) CLASS TPanel
DEFAULT nTop := 0, nLeft := 0, nBottom := 100, nRight := 100,;
oWnd := GetWndDefault(), lDesign := .F., lBorder := .F.
::lUnicode = FW_SetUnicode()
::nTop = nTop
::nLeft = nLeft
::nBottom = nBottom
::nRight = nRight
::oWnd = oWnd
Waiting for a solution with OemToAnsi() and CodePage()
nageswaragunupudi wrote:Waiting for a solution with OemToAnsi() and CodePage()
Do you have problem with FWH1905 or FWH2409 only?
// -> By Joao Santos - Sao Paulo - Brazil - kapiabafwh@gmail.com
// -> Participacao Especial, Vailton Renato - renato@kssoftware.com.br
#include "FiveWin.Ch"
STATIC oDlgRelog, oTimerRelog, lDesliga := .F., oWnd, oTimerPorta
STATIC oFnt, oSaida, oBtnTimer, oGetRao
FUNCTION RELOG()
LOCAL oSayMens, oFnt2, aGrad, oSayRao
oSayMens := "FWH24.09 it's Terrible! JESUS!!"
oSayRao := "FWH24.09: Fix OemtoAnsi() RAO!!"
aGrad := { { 0.30, CLR_BLACK, CLR_YELLOW }, { 0.70, CLR_YELLOW, CLR_BLACK } }
DEFINE FONT oFnt NAME "Arial" SIZE 08, 20 BOLD
DEFINE FONT oFnt2 NAME "Arial" SIZE 00, -12 BOLD
DEFINE DIALOG oDlgRelog FROM 3, 3 TO 20, 50 ;
TITLE "Test of Message with Timer" ;
GRADIENT aGrad TRANSPARENT STYLE nOR( DS_MODALFRAME )
oDlgRelog:lHelpIcon := .F.
@ .5, 07 SAY oSayMens OF oDlgRelog SIZE 100, 12 ;
COLOR CLR_BLACK, CLR_WHITE TRANSPARENT ADJUST UPDATE
@ 5.50, 05 GET oGetRao VAR oSayRao OF oDlgRelog SIZE 120, 10 PICTURE "@" ;
COLORS METRO_MAGENTA, CLR_WHITE UPDATE NOBORDER CENTER
@ 5, 09 BUTTON oBtnTimer PROMPT "&Click-me Rao" OF oDlgRelog ;
SIZE 70, 16 ACTION( ACIONA_TIMER( oWnd ) )
oBtnTimer:cToolTip := "Timer Action Rao"
SET FONT OF oBtnTimer TO oFnt
SET FONT OF oDlgRelog TO oFnt2
ACTIVATE DIALOG oDlgRelog CENTERED ON INIT( oGetRao:Hide() )
IF lDesliga
oTimerRelog:DeActivate()
oTimerPorta:DeActivate()
ENDIF
oFnt:End()
oFnt2:End()
RETURN NIL
FUNCTION ACIONA_TIMER( oWnd )
DEFINE TIMER oTimerPorta INTERVAL 50 OF oDlgRelog ;
ACTION ACIONA_RELOGIO( oWnd )
ACTIVATE TIMER oTimerPorta
RETURN NIL
FUNCTION ACIONA_RELOGIO( oWnd )
LOCAL oFont
DEFINE FONT oFont NAME "Arial" SIZE 0, -70 BOLD
DEFINE FONT oFnt NAME "Arial" SIZE 08, 20 BOLD
DEFINE TIMER oTimerRelog INTERVAL 50 ;
ACTION ExibeRelogio()
ACTIVATE TIMER oTimerRelog
SET FONT OF oDlgRelog TO oFont
SET FONT OF oBtnTimer TO oFnt
oFont:End()
lDesliga := .T. // -> Para Desligar o Timer
oTimerPorta:DeActivate()
RETURN NIL
FUNCTION ExibeRelogio()
LOCAL NewMensa := "FWH24.09 RAO!"
// Mensageria
IF ISWINDOWVISIBLE( oDlgRelog:hWnd )
oDlgRelog:Say( 3, 01, NewMensa, ;
CLR_YELLOW, CLR_BLACK,, .F. )
// .T. Esquerda - .F. Direita da Dialog.
oGetRao:Show()
ENDIF
RETURN NIL
// FIN / END - kapiabafwh@gmail.com .and. jairfab@gmail.com
nageswaragunupudi wrote:Waiting for a solution with OemToAnsi() and CodePage()
Do you have problem with FWH1905 or FWH2409 only?
Portuguese 850 PT850
Portuguese ISO-8859-1 PTISO
REQUEST HB_CODEPAGE_UTF8EX
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: D.Fernandez, George, Google [Bot], Otto and 35 guests