How to use UTF-8 characters in a PHP script?

How to use UTF-8 characters in a PHP script?

I know that there is an escape character to interpret the following two characters as UTF-8 . This escape \s . So, \xFF works, which will represent " ΓΏ ". But now I want to remove spaces of zero width ( U+200B ) from the string. How to do it? Can I use str_replace() or maybe preg_replace() ?

Thanks in advance.

+4
source share
3 answers

Remove the zero width space:

 $str = str_replace(chr(13), "", $str); 
-3
source

Source: https://habr.com/ru/post/1343343/


All Articles