Hi Otto,
I gotta say, I disagree with you. (As usual, pretty much :D )
I just looked at your convertUmlaute function... Seriously, Otto?
function convertUmlaute( cVData )
local cTest := ""
local i := 0
// Beispiel zur Analyse einzelner Zeichen
// for i := 1 to Len( cVData )
// ? ( cVData + CRLF + SubStr( cVData, i, 1 ) + " # " + Str( Asc( SubStr( cVData, i, 1 ) ) ) )
// next
// Umlaute klein
cVData := StrTran( cVData, Chr( 228 ), "ä" )
cVData := StrTran( cVData, Chr( 132 ), "ä" )
cVData := StrTran( cVData, Chr( 246 ), "ö" )
cVData := StrTran( cVData, Chr( 148 ), "ö" )
cVData := StrTran( cVData, Chr( 252 ), "ü" )
cVData := StrTran( cVData, Chr( 129 ), "ü" )
// Umlaute groß
cVData := StrTran( cVData, Chr( 196 ), "Ä" )
cVData := StrTran( cVData, Chr( 142 ), "Ä" )
cVData := StrTran( cVData, Chr( 214 ), "Ö" )
cVData := StrTran( cVData, Chr( 153 ), "Ö" )
cVData := StrTran( cVData, Chr( 220 ), "Ü" )
cVData := StrTran( cVData, Chr( 154 ), "Ü" )
// ß
cVData := StrTran( cVData, Chr( 223 ), "ß" )
cVData := StrTran( cVData, Chr( 225 ), "ß" )
// Weitere Akzente
cVData := StrTran( cVData, Chr( 224 ), "à" )
cVData := StrTran( cVData, Chr( 225 ), "á" )
return cVData
//----------------------------------------------------------------------------//
Every single time you call that function, you run 16 StrTran() operations on a string.
If I update just one record with only 10 fields = that's 160 times you're running it.
If you update just 10 records = that's 1,600 times.
I don't even want to think about what happens if you're dealing with memo fields. Seriously?
First off, like I've said before, you don't need to use UTF-8 on your website. It's definitely a good idea, but you can totally have a website using your DBF without doing any conversion at all.
Second, if you really need to encode in UTF-8 (which, fair enough, is the right way to go), you don't need to use this function you made. It's seriously killing the system's performance.
Just my two cents...
C.