Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 3:56 pm (All times are UTC )

 




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: RSS feeds in utf-8 bug
Posted: Thu May 29, 2008 9:04 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Sep 15, 2005 1:15 am
Posts: 133
we been having truble with garbage characters in my utf-8 feed - found out, that this is PHP error as html_entity_decode doesn't work for utf-8 ( php version is 5.2.6.)

So I created this workaround - but iso encoding in conversion should be changed to encoding that covers local characters.

in rss.php

Change:
$item_title = html_entity_decode( $item_title );

to
$item_title = mb_convert_encoding($item_title, "ISO-8859-2", $rss->encoding);
$item_title = html_entity_decode( $item_title );
$item_title = mb_convert_encoding($item_title, $rss->encoding, "ISO-8859-2");


and
$item_description = html_entity_decode( $item_description );

to

$item_description = mb_convert_encoding($item_description, "ISO-8859-2", $rss->encoding);
$item_description = html_entity_decode( $item_description );
$item_description = mb_convert_encoding($item_description, $rss->encoding, "ISO-8859-2");

_________________
JBS member
BzZzZ, marketing and web communication agency: http://www.bzzzz.biz
Belmondo.si travel: http://www.belmondo.si


Top
  E-mail  
 
Posted: Wed Oct 29, 2008 12:42 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 08, 2008 2:26 pm
Posts: 12
I there,

I don't know if this is the same issue. I cannot have the html parsed when parsing rss feeds into my joomla's content.

I've tried both Joomla 1.0.x. and 1.5.x on different servers with different components (this affect the core rss news feeds as well...) with different htaccess and php.ini configurations.

I've also tried different charsets with no results. Might you have any suggestion?

Thank you in advance.

Regards.

Lucfit


Top
  E-mail  
 
Posted: Wed Oct 29, 2008 5:30 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11674
Location: **Translation Matters**
Joomla 1.5.x should display in utf8 ALL correctly formatted feeds whatever their original charset.

This is not the case for 1.0 who can natively take only care of utf8 and iso-8559-1 feeds.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Wed Oct 29, 2008 9:00 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 08, 2008 2:26 pm
Posts: 12
Thanks,

I discovered what is causing my issue. This happens when I run joomla 1.5 on php5. No problems with php4. Unfortunately this requires not to use some components specifically designed to run with php5. I will try to find whether somebody else is facing this issue but it is not easy to find useful infos on this.

Thank you so much.

Lucfit


Top
  E-mail  
 
Posted: Fri Oct 31, 2008 2:46 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11674
Location: **Translation Matters**
lucfit wrote:
Thanks,

I discovered what is causing my issue. This happens when I run joomla 1.5 on php5. No problems with php4. Unfortunately this requires not to use some components specifically designed to run with php5. I will try to find whether somebody else is facing this issue but it is not easy to find useful infos on this.

Thank you so much.

Lucfit


Hmm...
Which version of PHP5 do you use?
Which version of Joomla 1.5 ?
Please also paste here a rss feed link which you have problems with, the link itself not a link to your site.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Fri Oct 31, 2008 4:00 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 08, 2008 2:26 pm
Posts: 12
infograf768 wrote:
lucfit wrote:
Thanks,

I discovered what is causing my issue. This happens when I run joomla 1.5 on php5. No problems with php4. Unfortunately this requires not to use some components specifically designed to run with php5. I will try to find whether somebody else is facing this issue but it is not easy to find useful infos on this.

Thank you so much.

Lucfit


Hmm...
Which version of PHP5 do you use?
Which version of Joomla 1.5 ?
Please also paste here a rss feed link which you have problems with, the link itself not a link to your site.



I'm running Joomla 1.5.7. The php version is php 5.2.5

I discovered that the system could smoothly hold both php 4 and 5 but it can only parse feeds with no losses when running on php4.

I'm so required to go to cpanel, select the php4, importing the feeds, then I'm free to select php5 again. This is not so handy nor useful to run a cronjob.

This happens with many components including the core joomla feeds. May this be related with a Simplepie bug?

I don't know.

e.g. of a feed: http://www.jobisjob.co.uk/rss?what=accounting

Thank you for your support.

Lucfit


Top
  E-mail  
 
Posted: Fri Oct 31, 2008 5:20 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11674
Location: **Translation Matters**
Your feed works OK here.
J! 1.5.7
PHP 5.2.4

Maybe this is a setting of your php which prevents the feed from being retrieved.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Fri Oct 31, 2008 10:42 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 08, 2008 2:26 pm
Posts: 12
I think so but still trying to understand which setting.

My hosting provider is not very supportive.

Anyway...thank you again for your interest.

Lucfit


Top
  E-mail  
 
Posted: Sat Nov 01, 2008 9:26 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11674
Location: **Translation Matters**
Look at your php settings for
allow_url_fopen

if it is off, it could be that setting.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group