You are here:  » utf-8 VS charset=ISO-8859-1


utf-8 VS charset=ISO-8859-1

Submitted by jubecuwe on Sat, 2007-04-07 17:15 in

hi there

My board is charset=ISO-8859-1
And I can't change this !

Magic parser need utf-8 to have good caracters.
Because of that, my board have weird specials caracters :
look at the left column here :
http://forum.bestofchat.com

Have you got an idea for not seeing those specials caracters ?
(note that weird caracters are only with php5)

(excuse my bad english, I'm french)

Thanks a lot !

Submitted by support on Sun, 2007-04-08 09:02

Hi,

The problem here is that the feed you are parsing contains utf-8 characters whereas your site is rendered in ISO-8859-1. To resolve this conflict, you will need to convert one or the other, and it is probably easiest to change the output from the feed. You can use PHP's utf8_decode() function to do this. For example, instead of:

<?php
  
function myRecordHandler($record)
  {
    
$myString $record["TITLE"];
  }
?>

... you would do this:

<?php
  
function myRecordHandler($record)
  {
    
$myString utf8_decode($record["TITLE"]);
  }
?>

Hope this helps!
Cheers,
David.

Submitted by jubecuwe on Mon, 2007-04-09 08:05

yes this really help me !
Thank you sooooooooooo much :P