2009/1/30 Alex Strickland <s...@mweb.co.za> > Viktor Szakáts wrote: > > Any comments? >> > > Are you thinking of catering for things like ß -> ss?
Yes, this one could be solved also. This actually makes it much more complicated that I've planned, but fits into the picture and needs to be solved. Another interesting area is cyrillic/greek characters (if we leave out far-east languages for now). Something like this, but in C: --- FUNCTION hb_StrToASCII( cSource ) LOCAL cTarget := "", nChar, tmp FOR tmp := 1 TO Len( cSource ) nChar := Asc( SubStr( cSource, tmp, 1 ) ) IF nChar >= 32 .AND. mChar <= 127 cTarget += SubStr( cSource, tmp, 1 ) ELSEIF HAS_ASCII_EQUIVALENT( nChar ) cTarget += GET_ASCII_EQUIVALENT( nChar ) /* May add multiple chars */ /* ELSE // Strip whole char */ ENDIF NEXT RETURN cTarget --- Brgds, Viktor
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour