note 82589 deleted from function.utf8-encode by cmb
| From: | cmb@php.net | Date: | Fri, 26 Oct 2018 20:19:45 +0000 |
| Subject: | note 82589 deleted from function.utf8-encode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-209530@lists.php.net to get a copy of this message | ||
Note Submitter: www.qaiser.net
----
that isUTF8 function is a killer...
wouldn't something like
if ( preg_match( "~(\x00[\x80-\xff]|[\x00-\x07][\x00-\xff]~", $string ) ) { /* is utf */
};
be a lot more efficient? it doesn't take into account all the ranges, but it has to be a better
method and a simple start since it'll quit on the first successful match. think of encoding and
decoding a 1mb string--not good. i'm having to work with +20 meg xml files.