I don't know what I should do to correct this problem. Anybody nows?
Thanks & sorry 4 my english.
"Such Skywalker" <alejand...@gmail.com> wrote in message
news:1139851375.2...@g44g2000cwa.googlegroups.com...
you should convert all special chars to htmlentities:
http://www.w3schools.com/tags/ref_entities.asp
you can do this in php with :
http://www.php.net/manual/en/function.htmlentities.php
Kind regards,
Kevin Wood
www.dasdan.be
I'll tell you what I am doing:
I'm doing an RSS reader for my homepage using the simpleXML class. The
core function is this one:
$news = simplexml_load_file($url);
if($url){
$site = "".$noticias->channel->title;
$i = 0;
foreach ($news->item as $new) {
$mystring[$sie][$i]["title"] = "".$new->title;
$mystring[$site][$i]["link"] = "".$new->link;
if(isset($new->description)){
$mystring[$new][$i]["desc"] = "".$new->description;
}
$i++;
$this->items++;
}
Well, when I get $new->title, the string has that strange characters
(example: "¿Bloquea Telefónica los envÃos SMTP? ¿Es legal
hacerlo?"), and I don't know how to correct them. I've thought about
using regular expressions. ¿Any other simpler ideas?.
You can see a very earlier version of my RSS reader on
http://raquiov.is-a-geek.org/modulos/rssReader.php
If the page doesn't appear, that's because I´m sleeping (the server is
in my bedroom).
> Hi, when I'm readig a text, sometimes words with accents (like the
> spanish word "está") appear in a wrong way (está = está).
char se.
> está
ISO-8859-1
>está
UTF-8
Bye.
Jasen
mb_convert_encoding($string, "ISO-8859-1", "auto");
and now it works.
Thanks 4 all.
Hello, Such.
You need to specify correct html charset and set correct value for default_charset variable in php.ini