[英]Convert utf-8 to iso-8859-2 (polish)
I have some problems downloading data event from facebook. 我从Facebook下载数据事件时遇到一些问题。 I have a site , add.php
, - this site is UTF-8
, next I'm sending a data to mysql
( utf-8
) and then I'm displaying information on website ( iso-8859-2
). 我有一个站点add.php
,这个站点是UTF-8
,接下来我将数据发送到mysql
( utf-8
),然后在网站上显示信息( iso-8859-2
)。 Problem is when I'm displaying this data there are no polish signs. 问题是当我显示此数据时,没有波兰语的迹象。
How can I convert this data to iso-8859-2
like on original event facebook page? 如何像原始事件Facebook页面上那样将此数据转换为iso-8859-2
?
I was trying iconv
but it doesn't work: 我正在尝试iconv
但不起作用:
function utf2iso( $tekst ) {
iconv( "UTF-8", "ISO-8859-2", $tekst );
return $tekst;
};
Iconv
doesn't works, please help - give me some advice! Iconv
无效,请帮助-给我一些建议!
PS. PS。 Sorry for my english :-) 对不起我的英语不好 :-)
iconv() returns converted text or false, but doesn't modify reference iconv()返回转换后的文本或false,但不修改引用
function utf2iso( $tekst ) {
return iconv( "UTF-8", "ISO-8859-2", $tekst );
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.