note 110204 deleted from ref.mbstring by googleguy
| From: | googleguy@php.net | Date: | Mon, 01 Oct 2012 11:24:46 +0000 |
| Subject: | note 110204 deleted from ref.mbstring by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191088@lists.php.net to get a copy of this message | ||
Note Submitter: David Drakard
----
My understanding is that str_replace may not work as required with multibyte strings. Example:
If you have a 2 byte encoding, then representing the bytes in hex, if you have the 3 character
string: 35 DF DF 6A DF DF
and you do the character replacement: DF DF ~> DF 42
with str_replace you get: 35 DF 42 6A DF 42
instead of: 35 DF DF 6A DF 42
For this reason you may wish to consider using another option.