Re: foreach() for strings

From: Date: Wed, 22 Jun 2011 13:57:04 +0000
Subject: Re: foreach() for strings
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-53514@lists.php.net to get a copy of this message
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

« previous php.internals (#53514) next »