Can str_replace mangle a UTF-8 encoded string if it's only given valid UTF-8 encoded strings as argu

Posted by Manos Dilaverakis on Stack Overflow See other posts from Stack Overflow or by Manos Dilaverakis
Published on 2010-04-16T10:33:23Z Indexed on 2010/04/16 10:43 UTC
Read the original article Hit count: 211

Filed under:
|

PHP's str_replace() was intended only for ANSI strings and as such can mangle UTF-8 strings. However, given that it's binary-safe would it have a problem if it was only given valid UTF-8 strings as arguments?

Edit: I'm not looking for a replacement function, I would just like to know if this hypothesis is correct.

© Stack Overflow or respective owner

Related posts about utf-8

Related posts about php