#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 := UPPER( TiraAcento( cStr ) )
MEMOWRIT( ".\UTF8.txt", ;
hb_strtoutf8(cStr) +CRLF+ ;
hb_strtoutf8(HB_AnsiToOem(cStr)) +CRLF+ ;
HB_StrToUTF8( cStr,"ESWIN" ) )
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)
Regards, saludos.