note 111596 deleted from function.htmlspecialchars by cmb
| From: | cmb@php.net | Date: | Sun, 27 Oct 2019 09:19:53 +0000 |
| Subject: | note 111596 deleted from function.htmlspecialchars by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212856@lists.php.net to get a copy of this message | ||
Note Submitter: strange dot alex at gmail dot com
----
> For the purposes of this function, the encodings ISO-8859-1, ISO-8859-15, UTF-8, cp866, cp1251,
> cp1252, and KOI8-R are effectively equivalent, provided the string itself is valid for the encoding,
> as the characters affected by htmlspecialchars() occupy the same positions in all of these
> encodings.
This is not true, actually!
$txt = "Russian text in KOI8-r<br>"; // type here realy russian text in koi8-r !
htmlspecialchars($txt,null,'KOI8-R') = Russian text in KOI8-r<br>
htmlspecialchars($txt,null,'UTF-8') =
Result is EMPTY !!!