P
P
pandaa2019-04-12 19:08:53
PHP
pandaa, 2019-04-12 19:08:53

Why don't the mb_convert_encoding() and iconv() functions work?

Tried like this:

$str = file_get_contents('http://antiko22.info/vse_novosti/dolg-pered-mfo-ne-mozhet-prevyshat-telo-zajma-bolee-chem-v-3-raza/');
echo iconv("windows-1251", "UTF-8", $str); //ничего не вывелось

So
$str = file_get_contents('http://antiko22.info/vse_novosti/dolg-pered-mfo-ne-mozhet-prevyshat-telo-zajma-bolee-chem-v-3-raza/');
echo mb_convert_encoding($str, "UTF-8", "windows-1251"); //ѕРЅРЅС‹Р№РїРѕСЂС‚Р

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentin, 2019-04-12
@pandaa

echo mb_convert_encoding($str, "UTF-8");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question