On Wednesday 16 July 2008 04:50:47 Marcus wrote: > There is one thing which needs adding in text captchas -- comparison > needs to be case-insensitive for some languages and case-sensitive for > others (see below). I think most are case-insensitive so that should > be default. ... > > $resp = strtolower($resp); ... > on a website written in German, users would expect the respective > response to the "which is larger, and elephant or an ant?" challenge, > to be "Elefant", not "elefant".
I believe if the German user writes the correct answer, but all-lowercase or all-uppercase, this should be considered successfull, and access should be granted; in any case, there are few chances that this would be filled by a robot. > - For the PHP function "strtolower()" to work with languages with > non-ASCII upper-case letters, e.g. A with umlaut in German, the locale > needs to be set accordingly on the server. You can use the PmWiki built-in function $StrFoldFunction which transforms the text to lowercase, both on the standard 8-bit latin-1 encoding and in unicode/utf-8: $resp = $StrFoldFunction($resp); Thanks, Petko _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
