PHP Convert Windows-1251 to UTF 8

前端 未结 5 663
粉色の甜心
粉色の甜心 2021-01-04 10:03

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

5条回答
  •  轮回少年
    2021-01-04 10:53

    You know, message like Показать мн you see if encoding for page is windows-1251, but text encoded in utf-8.
    I saw this problem in one of my project, so just change change encoding for page in utf-8 and this text will shown correctly.

    Let me take you some examples:
    if page in utf-8, but text in windows-1251 you wil see something like this:
    ???? ?? ?????? ??? ????? ??? ??????? ?? ????? ???? ??? ?????

    if page in windows-1251, but text in utf-8 you see this:
    "Мобильные телефоны";"Apple iPhone 4

提交回复
热议问题