简体   繁体   中英

Convert utf-8 to iso-8859-2 (polish)

I have some problems downloading data event from 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 ). 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?

I was trying iconv but it doesn't work:

function utf2iso( $tekst ) {
  iconv( "UTF-8", "ISO-8859-2", $tekst );
  return $tekst;
  };

Iconv doesn't works, please help - give me some advice!

PS. Sorry for my english :-)

iconv() returns converted text or false, but doesn't modify reference

function utf2iso( $tekst ) {
    return iconv( "UTF-8", "ISO-8859-2", $tekst );
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM