It comes to me from the PHP handler of the famous SMS service. But the whole problem is that when I try to pull out the information, it is “attached” to the beginning, “here is such a symbol:” & amp; # 65279 “At the end more”; “(if I write everything together, it will be empty in this message) . It is also displayed as a space.
How to get rid of it (PHP)?
Answer 1, Authority 100%
This character is Byte sequence marker . It must be removed from the start of the PHP processor file. If the handler on the service side is to inform technical support
Answer 2, Authority 100%
Maybe there is a really different solution solution, but that’s what I came up with:
$ text = trim (substr ($ text, 3));
or
$ Text = Trim (Substr ("CP1251", "UTF-8", $ Text), 6)) ;
or
$ str = trim (preg_replace ('/ \ x {feff} / u', '', $ str)));
The whole problem is that the answer comes from them in CP1251, and everything works for UTF-8 without a break.