问题
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