[amphetadesk-develop] [ amphetadesk-Bugs-1053116 ] Could not determine the format
Status: Beta
Brought to you by:
morbus
From: SourceForge.net <no...@so...> - 2009-10-02 10:15:25
|
Bugs item #1053116, was opened at 2004-10-24 09:37 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=372519&aid=1053116&group_id=21649 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Felix Geyer (sniperbeamer) Assigned to: Nobody/Anonymous (nobody) Summary: Could not determine the format Initial Comment: When adding this rss feed to AmphetaDesk I get the following error message: AmphetaDesk could not determine the format of http://www.betanews.com/rss2. What's the problem? ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-10-02 10:15 Message: email effects 1960 warmer ---------------------------------------------------------------------- Comment By: Morbus Iff (morbus) Date: 2004-11-02 14:52 Message: Logged In: YES user_id=69804 The latest CVS has had this code/patch for a while. From the CVS CHANGELOG: - the following XML encodings have been added to AmphetaDesk. from XML::Parser::Encodings: big5, euc-kr, iso-8859-2 through -9, windows-1250 and 1252, x-euc-jp-jisx0221, x-euc-jp-unicode, x-sjis-cp932, x-sjis-jdk1117, x-sjis-jisx0221, x-sjis-unicode. from Klaus Johannes Rusch: iso-8859-15. more information on how to build your own encodings, as well as insert them into Ampheta: http://sf.net/tracker/? func=detail&aid=766157&group_id=21649&atid=372519 ---------------------------------------------------------------------- Comment By: Chad Cloman (captainchad) Date: 2004-11-02 14:34 Message: Logged In: YES user_id=810746 I did a little more research and found that XML::Parser has native support for the following encodings: UTF-8, ISO-8859-1, UTF-16, and US-ASCII. In order to add additional encodings, you need to use XML::Encoding. Details can be found here: http://www.xml.com/pub/a/2000/04/05/feature/ ---------------------------------------------------------------------- Comment By: Chad Cloman (captainchad) Date: 2004-11-02 14:11 Message: Logged In: YES user_id=810746 RSS 2.0 is not the problem. The issue appears to be with the XML encoding on the first line of the file: <?xml version="1.0" encoding="windows-1252" ?> I removed the 'encoding="windows-1252"' statement and everything worked fine. I suppose this means that windows-1252 is not supported by the XML parser used by amphetaDesk. (Note that the "bad" site provided by cero, http://www.blogigo.de, also uses encoding="windows-1252".) windows-1252 is a somehwat recent addition to the list of official character sets. It may be that newer versions of XML::Parser can handle it. Morbus should look into this, because it seems that the charset is gaining some popularity. Whenever load_channel() fails, as in this case, the error message is misleading. [See bug 793580, "Wrong Error Message (add_url is evil)".] To workaround this problem, you can edit <AmphetaDesk>/lib/AmphetaDesk/Channels.pm (where <AmphetaDesk> is the amphetaDesk install directory). Go to the subroutine 'load_channel', then page down (or search) until you find the call to XMLin. On amphetaDesk 0.93.1, the call looks like this: my $data = eval { XMLin($channel_xml, forcearray=> [ "item" ], keyattr => [ ], suppressempty=>undef ) }; Immediately above this line, add the following: $channel_xml =~ s/windows-1252/ISO-8859-1/sg; Before this change will take effect, you will need to close the amphetaDesk window in your browser and then exit and restart the main amphetaDesk console. You can replace the string "ISO-8859-1" with any encoding you wish (such as UTF-8). Or you can even delete the entire encoding parameter like so: $channel_xml =~ s/encoding="windows-1252"//sg; ---------------------------------------------------------------------- Comment By: Christoph (cero) Date: 2004-11-02 11:29 Message: Logged In: YES user_id=505720 Does also not work with http://www.blogigo.de which uses rss 2.0! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=372519&aid=1053116&group_id=21649 |