By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,825 Members | 2,437 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,825 IT Pros & Developers. It's quick & easy.

problem with utf8

P: n/a
hi people,

i have a script :
<?
$num=0;
$backendURL = "http://rezo.net/backend/afp";

$limit = 1; // nombre maxi de news afficher.

$file = fopen( $backendURL, "r");
if( $file ) {
$raw = fread( $file, 32000 );
fclose( $file );
if( eregi("<item>(.*)</item>", $raw, $rawitems ) ) {
$items = explode("<item>", $rawitems[0]);
$nb = count($items );

eregi("<title>(.*)</title>",$items[$num+1], $title);
eregi("<link>(.*)</link>",$items[$num+1], $link);

$tp2=$title[1];
$tp3=$link[1];
}
} else {
$tp2="Pas de news";
}

$tmp="info0_txt=".$tp2."&info0_lien=".$tp3;
$tmp=utf8_encode($tmp);
echo $tmp;

?>

But the text isn't encoded by $tmp=utf8_encode($tmp);
IF I retrieve data from a base (mysql) that 's work !! WHY ?!
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.