user2058653 user2058653 -5 years ago 442
PHP Question

PHP Convert Windows-1251 to UTF 8

I have a small html code and I need to convert it to UTF-8.

I use this

iconv("windows-1251", "utf-8", $html);

All text converts correctly, but if text for example in tag
, then it don't convert text and I see somethig like this
Показать мн

Answer Source

If you have access to the Multibye package, you can try it. See the PHP page here:

$html_utf8 = mb_convert_encoding($html, "utf-8", "windows-1251");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download