David Orn Johannsson wrote:
> I'm having a problem with StrToLower function in php
>
> I'm trying to convert characters like Þ and acute letters from
> uppercase to lowercase, but it dosen't work.
>
> this is what the manual says: "Note that 'alphabetic' is determined by
> the current locale. This means that in i.e. the default "C" locale,
> characters such as umlaut-A (�) will not be converted."
> dose this mean that it dosen't return acute and other letters like that
> or is it a matter of configuration on the server?
Well, here is the actual loop which does the lowering for you:
for (i=0; i<len; i++) {
ch = tolower((unsigned char)*c);
*c++ = ch;
}
return (s);
It is using the std c-function tolower()
man tolower tells me
NAME
toupper, tolower - convert letter to upper or lower case
RETURN VALUE
The value returned is that of the converted letter, or c if
the conversion was not possible.
So I take it all weird characters are just left alone and returned to
you, as is.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php