our landingpage example works with dbfs.
Please can you help me: What is the difference between "Codifica ANSI" and "Codifica OEM".
i have to use a lot of special characters and therefor have a function
- Code: Select all Expand view
- function convertUmlaute( cVData )
local ctest := ""
local I := 0
// ´
cVData := STRTRAN(cVData, chr(180), "´" )
// Ä
cVData := STRTRAN(cVData, chr(196), "Ä" )
// Ö
cVData := STRTRAN(cVData, chr(214), "Ö" )
// Ü
cVData := STRTRAN(cVData, chr(220), "Ü" )
// ß
cVData := STRTRAN(cVData, chr(223), "ß" )
// à
cVData := STRTRAN(cVData, chr(224), "à" )
// á
cVData := STRTRAN(cVData, chr(225), "á" )
// ä
cVData := STRTRAN(cVData, chr(228), "ä" )
// ö
cVData := STRTRAN(cVData, chr(246), "ö" )
// ü
cVData := STRTRAN(cVData, chr(252), "ü" )
return(cVData)
that is called for example from here:
- Code: Select all Expand view
use ( cTMPPage ) new ALIAS landingpage
logging( "close: " + cTMPPage )
Close
use ( cTMPPage ) new ALIAS landingpage
index on field->ID TAG TmpB5Nr TO TEMP5 TEMPORARY
do while .not. eof()
if field->ready = .T.
if field->LANGUAGE = cPage
nRecords += 1
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( nRecords ) ) + "_" ) )
if VALTYPE( field->ID ) = "N"
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( nRecords ) ) +"_ID" ] = ALLTRIM( field->ID )
elseif VALTYPE( field->ID ) = "D"
hHash_DBF[ "REC" + "_" + ALLTRIM( STR(nRecords ) ) +"_ID" ] = dtoc( field->ID )
elseif VALTYPE( field->ID ) = "C" .or. VALTYPE( field->ID ) = "M"
if LEN( ALLTRIM( field->ID ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( nRecords ) ) +"_ID" ] = ALLTRIM( field->ID )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( nRecords ) ) +"_ID" ] = ALLTRIM( CONVERTUMLAUTE ( field->ID ) )
endif
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( nRecords ) ) +"_ID" ] = ALLTRIM( field->ID )
endif
but if I input a special character in "Codifica OEM" mode it is not showing correctly on my site...
http://winhotel.space/lp/bergland_sillian/landingpage3.prg?sprache=it
would it be better to work with "codifica ANSI" in general?
thank you a lot and kind regards
ruth