note 50313 deleted from function.utf8-encode by cmb
| From: | cmb@php.net | Date: | Sun, 22 Dec 2019 09:02:49 +0000 |
| Subject: | note 50313 deleted from function.utf8-encode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213581@lists.php.net to get a copy of this message | ||
Note Submitter: Denis G.
----
Sniplet to convert ASCII coded text to UTF-8:
$text= preg_replace ('/([\x80-\xff])/se', "pack (\"C*\", (ord ($1) >>
6) | 0xc0, (ord ($1) & 0x3f) | 0x80)", $text);