#36 Could not determine the format

open
nobody
None
5
2004-10-24
2004-10-24
No

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?

Discussion

  • Christoph
    Christoph
    2004-11-02

    Logged In: YES
    user_id=505720

    Does also not work with http://www.blogigo.de which uses rss
    2.0!

     
  • Chad Cloman
    Chad Cloman
    2004-11-02

    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;

     
  • Chad Cloman
    Chad Cloman
    2004-11-02

    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/

     
  • Morbus Iff
    Morbus Iff
    2004-11-02

    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

     
  • email effects 1960 warmer

     
  • research results began include amount few extinction