MDN

Go Back   Mambo - Forums Closed for posting > Mambo 4.5.5 - Stable > General Questions

Reply
 
Thread Tools Search this Thread Display Modes
Old December 20th, 2004, 03:47   #1
nomasis
 
Join Date: Apr 2004
Posts: 5
nomasis is on a distinguished road
Question Having troubles with characters in RSS feed

Hi !
I'm testing Mambo which seems to be great but I'm wondering if the RSS feed can handle several character encoding since the french character (accents) are not recognized (in fact the titles are correct but not the content).

I did'nt succeed in finding where to specify the character encoding for the 2.0 RSS feed my site provide.
As per example I got this (even with Sage in Firefox or with stand alone readers as Sharpreader or Feedreader) :
the original text : l'entrée
through the feed :
Code:
l'entrée
Where must I tell RSS component the character encoding must be "iso-8859-1" ?

PS : even the apostroph is not converted, but it is on the forum. ;-)
__________________
Have a nice day
Philippe
nomasis is offline   Reply With Quote
Old December 20th, 2004, 04:00   #2
drcorbeille
 
drcorbeille's Avatar
 
Join Date: Aug 2004
Location: Sierre, Switzerland
Posts: 155
drcorbeille is on a distinguished road
Default

I haven't tried this now, but there seems to be a solution here

http://www.mamboreport.de/cms/index....sk=view&id=781

This page is in german, basically it says to edit components/com_rss/rss.php

and change this
Code:
145:// removes all formating from the intro text for the description text
146:$item_description = $row->introtext;
147:$item_description = mosHTML::cleanText( $item_description );
148:$item_description = html_entity_decode( $item_description ); //Umwandlung
Make sure you backup your file before trying this !

Please let me know if this did the job,

Chris
__________________
Chris
__________

dr.corbeille.info
drcorbeille is offline   Reply With Quote
Old December 20th, 2004, 22:59   #3
stingrey
 
Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
stingrey is on a distinguished road
Default

We are aware of this bug - it was reported on the tracker (and fixed in the CVS).

The fix will be available in the forthcoming 4.5.2 Maintenance Version release slated for late January.
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission

Former Mambo Core Team Member July 2004 - August 2005
stingrey is offline   Reply With Quote
Old December 21st, 2004, 02:28   #4
nomasis
 
Join Date: Apr 2004
Posts: 5
nomasis is on a distinguished road
Default It's working !

By just adding the above line :
Code:
$item_description = html_entity_decode( $item_description );
it works great.

Thanks for your answers and have nice christmas. I already have my gift ;-)
__________________
Have a nice day
Philippe
nomasis is offline   Reply With Quote
Old March 1st, 2005, 13:09   #5
Ivalde
 
Join Date: Jan 2005
Posts: 6
Ivalde is on a distinguished road
Default

Hi, reopening this thread...

Have similar problem as Philippe but unfortunally the above code did not solve the problem. It seems like feeding with encoded iso-8859-1 does not works as it should.

Basically I feed Swedish to my site and the 3 extra vowel we have added compared to the "english" alphabet is showed as:
View with iso-8859-1
(Swedish) å => Ã¥
(Swedish) ä => ä
(Swedish) ö => ö

When forcing my browser to use UTF-8, the feed is showed correctly but then the rest of the site gets incorrect character coding.
Since all nordic languages have similar vowels this problem would occur also in norwegian and danish.

Exemple feed:
http://testcentret.idg.se/tjanster/rss/rss.xml

My Mambo version is 4.5.1a Stable [Three For Rum] 05/10/2004 and I have the Swedish languagepack installed.

If anyone have an idea how to solve this........much appreciated

//Magnus
Ivalde is offline   Reply With Quote
Old March 1st, 2005, 17:30   #6
tjay
 
tjay's Avatar
 
Join Date: Feb 2004
Location: New Orleans
Posts: 893
tjay is on a distinguished road
Default

mod note moved to general questions
tjay is offline   Reply With Quote
Old March 11th, 2005, 13:37   #7
bo.hasselblad
 
Join Date: Feb 2005
Location: Linkoping, Sweden
Posts: 1
bo.hasselblad is on a distinguished road
Default

Hi Magnus:

Had the same problem you have with a feed from Svensk Golf ( http://www.golf.se/xml/rss/index_10_latest.rss) when developing on my local, WAMP platform. However, when uploaded to my hosting provider on a LAMP platform it works just fine. Same settings and code for the entire site. Using same setting for the browser, whether Firefox or IExplorer (Autodetect: Universal; Coding: ISO-8859-1).

My quick assumption was that either the Apache configuration differs and I can't work out where or the O/S is better equipped to handle the different character encodings.

However, not looking a gift horse in the mouth I leaving everything well enough alone now ;-)

Maybe not much help, but maybe another piece of a puzzle.

Good luck,
Bo
bo.hasselblad is offline   Reply With Quote
Old March 12th, 2005, 08:44   #8
Ivalde
 
Join Date: Jan 2005
Posts: 6
Ivalde is on a distinguished road
Default

Thanks Bo, for your input.

Have spent some 10 effective hours trying to figure this out. But since I am no wizard in this topic and could not find any help I did a workaround.

Dropped the News feed component and used the Wrapper instead. Creating a "stand-alone" page and with javascript displaying the RSS-feed from my suppliers.

I think the problem is platform independent (running LAMP) and the solutions is to be found in the setup of (in this case) the Apache-server basic character handling. But I couldn´t figure out how to.

Sad, since the built-in functionallty was fine as long as the feed was in english. But my site is swedish speaking.

//Magnus
Ivalde is offline   Reply With Quote
Old March 12th, 2005, 15:19   #9
Ivalde
 
Join Date: Jan 2005
Posts: 6
Ivalde is on a distinguished road
Default

Have understod where the problem was.

I had my Apache config with iso-8859-1. Needed to changed this to UTF-8
This means some older browersers might not interpet the site correctly but for this site, that is not an issue.

When changing to UTF-8 all content and the swedish.php (language) was now still iso-8859-1 encoded.
The language file was merly to change to encoding UTF-8 (used gvim) and then all autogenerated content was ok.

The site I just is setting up, do not have much content yet so.....I did the rest the hard way. Opened each document - changed the language specific characters - Saved. --urk--! All new content will of course be UTF-8 encoded from this point.

This is not something you do with a full site in production and I assume there is a way to solve this in a autometed way.

Anyway, the site is now UTF-8 and the newsfeed works as it is supposed to.

/Magnus
Ivalde is offline   Reply With Quote
Old August 9th, 2005, 09:37   #10
torkil
 
Join Date: Oct 2004
Posts: 30
torkil is on a distinguished road
Default

Took you some time that one... I'm having the same issue, but I'm on a shared server and unable to change apache settings... Advice anyone?

Sorry for crossposting, google helped me find this thread as the forum search engine is not so good.

Original post: http://forum.mamboserver.com/showthr...ht=rss+charset
torkil is offline   Reply With Quote
Old August 12th, 2005, 13:16   #11
J-P
 
Join Date: Jun 2005
Posts: 3
J-P is on a distinguished road
Default

Im having same problem with Nomasis, my english rss news show up like this: compound's instead of: compound's.

I have version 4.5.2 and I understood that this would have been fixed, but still I'm having that problem. Here is copy of my rss.php, I think all is in order there?

// removes all formating from the intro text for the description text
$item_description = $row->introtext;
$item_description = mosHTML::cleanText( $item_description );
$item_description = html_entity_decode( $item_description );

Any word of advice?
J-P is offline   Reply With Quote
Old October 9th, 2005, 12:01   #12
GrendelS
 
Join Date: May 2005
Posts: 11
GrendelS is on a distinguished road
Default same problem, different solution?

Quote:
Originally Posted by Ivalde
Have understod where the problem was.

I had my Apache config with iso-8859-1.
Mine's set to this as well, but I can't change to utf-8, since I have other tables in the same database which would lead to other scripts not displaying the content properly. Actually, my database's internal encoding is latin1, mambo itself it set to german de_DE. Now, the newsfeed is from a German site as well, but the encoding seems to be unicode (see daad.iroke.de, on the lower right side). The code mentioned above is already in the rss.php, but the feed doesn't display right. What else could I do?
GrendelS is offline   Reply With Quote
Old October 17th, 2005, 10:30   #13
wilko_76
 
Join Date: Sep 2005
Posts: 6
wilko_76 is on a distinguished road
Default

Hi,

I think I've identified the problem however I'm not sure how to resolve it! It would appear that the code is converting ' to '. I'm a little unsure how to resolve this issue and any advise would be appreciated.

Thanks,

Andy
wilko_76 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -7. The time now is 07:35.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.