On 06/22/2011 06:52 AM, Reindl Harald wrote: > > > Am 22.06.2011 15:45, schrieb Lars Schultz: >> Am 22.06.2011 15:40, schrieb Reindl Harald: >>> and why this will not return true if $str is ISO-8859-1? >> If you RTFM (in your jargon) you would know. >> >> http://ch.php.net/manual/en/function.htmlspecialchars.php (Return value >> Section) > > i read the fucking manual > >> If the input string contains an invalid code unit sequence within the given >> charset >> and the ENT_IGNORE flag is not set, then htmlspecialchars() will return an >> empty string. > > so damend NOT ALL CHARACTERS are multibyte and so it will return true for > "hello" > so what will you tell me above boy?
There is obviously no way to tell if "hello" is UTF-8 or ISO-8859-1. It is technically impossible since the two are identical in that range. And please keep things polite. It is very rare that I warn people about that here, and I will only do it once. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php