&é"'(§è!çà)-âêîûôäëïöü
&é"'(§è!çà )-âêîûôäëïöü
// C:\FWH\SAMPLES\DRIESSEN.PRG
#Include "FiveWin.ch"
FUNCTION Main()
LOCAL oWnd, oBar
DEFINE WINDOW oWnd MDI
ACTIVATE WINDOW oWnd ON INIT( TXT_Driessen() )
RETURN NIL
FUNCTION TXT_Driessen()
LOCAL cTxt_Dri := SPACE( 50 )
cTxt_Dri := [ &é"'(§è!çà)-âêîûôäëïöü ]
? cTxt_Dri
? OemToAnsi( cTxt_Dri )
? AnsiToOem( cTxt_Dri )
RETURN NIL
// FIN / END
#include "FiveWin.ch"
/* #translate SET CODEPAGE TO SPANISH => REQUEST HB_CODEPAGE_ESWIN ; hb_setcodepage("ESWIN") */
// #translate SET CODEPAGE TO SPANISH => REQUEST HB_CODEPAGE_ESWIN ; hb_cdpSelect("ESWIN")
REQUEST HB_CODEPAGE_ESWIN
REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ES850C
REQUEST HB_CODEPAGE_ESISO
FUNCTION SALAZAR_UTF8()
LOCAL cString, cStr
//hb_setcodepage("ESWIN")
//hb_cdpSelect("ESWIN")
// O:
HB_SETCODEPAGE('ES850C')
HB_LANGSELECT('ES')
HB_SETCODEPAGE( "UTF8" )
// cStr :="áéíóú ÁÉÍÓÚ"
cStr := [ &é"'(§è!çà)-âêîûôäëïöü ]
cStr := UPPER( TiraAcento( cStr ) )
MEMOWRIT( ".\UTF8.txt", ;
hb_strtoutf8(cStr) +CRLF+ ;
hb_strtoutf8(HB_AnsiToOem(cStr)) +CRLF+ ;
HB_StrToUTF8( cStr,"ESWIN" ) )
// Edit: UTF8.txt
RETURN NIL
FUNCTION TiraAcento( cText )
LOCAL ARINICIO, ARFIM, XRETTEXT, ICTEXT, LETRACTEXT
cText := StrTran(cText,"\","/")
cText := StrTran(cText,"Ã","A")
cText := StrTran(cText,"Â","A")
cText := StrTran(cText,"Á","A")
cText := StrTran(cText,"Ä","A")
cText := StrTran(cText,"À","A")
cText := StrTran(cText,"ã","a")
cText := StrTran(cText,"â","a")
cText := StrTran(cText,"á","a")
cText := StrTran(cText,"ä","a")
cText := StrTran(cText,"à","a")
cText := StrTran(cText,"É","E")
cText := StrTran(cText,"Ê","E")
cText := StrTran(cText,"Ë","E")
cText := StrTran(cText,"È","E")
cText := StrTran(cText,"é","e")
cText := StrTran(cText,"ê","e")
cText := StrTran(cText,"ë","e")
cText := StrTran(cText,"è","e")
cText := StrTran(cText,"Í","I")
cText := StrTran(cText,"Î","I")
cText := StrTran(cText,"Ï","I")
cText := StrTran(cText,"Ì","I")
cText := StrTran(cText,"í","i")
cText := StrTran(cText,"î","i")
cText := StrTran(cText,"ï","i")
cText := StrTran(cText,"ì","i")
cText := StrTran(cText,"Ó","O")
cText := StrTran(cText,"Õ","O")
cText := StrTran(cText,"Ô","O")
cText := StrTran(cText,"ó","o")
cText := StrTran(cText,"Ö","O")
cText := StrTran(cText,"Ò","O")
cText := StrTran(cText,"õ","o")
cText := StrTran(cText,"ô","o")
cText := StrTran(cText,"ó","o")
cText := StrTran(cText,"ö","o")
cText := StrTran(cText,"ò","o")
cText := StrTran(cText,"Û","U")
cText := StrTran(cText,"Ú","U")
cText := StrTran(cText,"Ü","U")
cText := StrTran(cText,"Ù","U")
cText := StrTran(cText,"û","u")
cText := StrTran(cText,"ú","u")
cText := StrTran(cText,"ü","u")
cText := StrTran(cText,"ù","u")
cText := StrTran(cText,"Ç","C")
cText := StrTran(cText,"ç","c")
cText := StrTran(cText,"£","E")
cText := StrTran(cText,"&","E")
cText := StrTran(cText,"<",".")
cText := StrTran(cText,">",".")
cText := StrTran(cText,"ª","a")
cText := StrTran(cText,"º","o")
cText := StrTran(cText,"´"," ")
cText := StrTran(cText,"²","2")
cText := StrTran(cText,"³"," ")
cText := StrTran(cText,"¹","1")
arINICIO := 32
arFIM := 126
xRetText := ""
For IcText=1 to len(cText)
LetracText := subs( cText, IcText, 1 )
if asc(LetracText)<arINICIO .or. asc(LetracText)>arFIM
LetracText := " "
end
xRetText += LetracText
next
RETURN(xRetText)
// FIN / END
Antonio, no solution yet? What changed from FWH 13.07 to 13.10? To my opinion it must be related to some changes in FWH 13.10.
#include "fivewin.ch"
function Main()
? HB_CDPSELECT(), HB_CDPUNIID(), GetACP(), GetOEMCP()
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( GETACP ) { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }
#pragma ENDDUMP
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], karinha, Natter and 79 guests