1

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 :-)

Rashid
  • 4,326
  • 2
  • 29
  • 54
MB83
  • 13
  • 1
  • 5
  • Why not in html set the charset `` – Mihai Oct 29 '14 at 16:32
  • website have a charset iso-8859-2, i can download and send to database data in utf-8 but i cant convert to iso-8859-2 and display with polish signs. – MB83 Oct 29 '14 at 16:41

1 Answers1

0

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

function utf2iso( $tekst ) {
    return iconv( "UTF-8", "ISO-8859-2", $tekst );
};
Patryk Uszyński
  • 1,069
  • 1
  • 12
  • 20