How convert PHP value from windows-1257 to UTF-8

北战南征 提交于 2020-01-01 14:45:50

问题


How convert PHP value from windows-1257 to UTF-8? I tried many ways, but they was not successful. I have lttu�s and I wanna convert this to littūs.

utf8_encode(); 
iconv_set_encoding("windows-1257", "UTF-8");
mb_convert_encoding()

Doesn't work. :(

Can anybody help me?


回答1:


$encoded= iconv ("CP1257","UTF-8", $string)



回答2:


Use mb_convert_encoding($data, 'UTF-8', 'ISO-8859-13');




回答3:


Have you checked that the page you are using to display the converted string has the Encoding and CodePage set correctly?



来源:https://stackoverflow.com/questions/2547259/how-convert-php-value-from-windows-1257-to-utf-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!