Answer the question
In order to leave comments, you need to log in
The str_replace function cuts Cyrillic. How to fix?
On the local server, when calling the str_replace function, there are no problems; on the production server, the Cyrillic alphabet disappears from the final string. Someone faced a similar problem? Tell me how to fix it? iconv doesn't help. Transfers were made by Unix (LF) everywhere and did not help either
Answer the question
In order to leave comments, you need to log in
if you explain it in a simple way: the problem is in the difference between the encoding of the code and the lines
that come from the side (db/scraping/http requests/etc).
accordingly, they must be brought to the same denominator.
example script in UTF-8 and string in WIN-1251.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question