We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23256
    • 2 Posts
    Can somebody help me on the underneath issue?

    I try to FEEDX underneath rss feed....

    http://feeds.feedburner.com/MeatInfoBreakingNews?format=xml

    I use in my chunck following code:
    [!FeedX? &url=`http://feeds.feedburner.com/MeatInfoBreakingNews|xq|format|xe|xml` &preset=`rss` &cacheTime=`3600`!]

    but I always get the underneath error:
    PHP error debug
    Error: xml_parser_create() [function.xml-parser-create]: unsupported source encoding "windows-1252"
    Error type/ Nr.: Warning - 2
    File: /home/magmafoo/public_html/website/assets/snippets/FeedX/classes/feedx.class.inc.php
    Line: 337
    Line 337 source: $parser = xml_parser_create($encType);

    Any idea!

    Appreciate your support!

    Philoe
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The incoming XML file is encoded in windows-1252. The PHP xml libraries don’t support that encoding. You can try adding this to the feedx.class.inc.php file at line 336, just before the call to the xml_parser_create function call
      // windows-1252 and ISO-8859-1 are not exactly the same, but
      they are close enough
      if (strcasecmp($encType, "windows-1252") == 0) {
      $encoding = "ISO-8859-1";
      }

      http://en.wikipedia.org/wiki/ISO_8859-1
      http://us2.php.net/manual/en/function.strcasecmp.php
      http://osdir.com/ml/php.drupal.devel/2004-03/msg00201.html

        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 23256
        • 2 Posts
        Tried your suggestion....

        Unfortunately,
        get now following error code:
        PHP error debug
        Error: mb_convert_encoding() [function.mb-convert-encoding]: Unable to detect character encoding
        Error type/ Nr.: Warning - 2
        File: /public_html/website/assets/snippets/FeedX/classes/feedx.class.inc.php
        Line: 104
        Line 104 source: return mb_convert_encoding($output, $modx->config[’modx_charset’], ’auto’);

        tnx so far,
        Philoe
          • 22770
          • 285 Posts
          PatrickSamphire Reply #354, 17 years ago
          Okay, I want to use FeedX to match a single item from an RSS feed where the LINK element matches a particular URL.

          So, for example, I want to extract data from an item which has
          <link>http://www.example.com/123456.html</link>


          I’m trying to use filterElements for this, but I don’t understand regular expressions well enough to succeed. I figure I need to use

          &filterElements=`ITEM(LINK NE /url/)`
          where ’url’ is the regular expression that matches the URL in the link above, but I can’t figure out how to do that. Any suggestions?
            • 36571
            • 145 Posts
            There has previously been some mention about the ability to merge several feeds into one useing this snippet.

            Is this possible, and if so, how is it done?

            The idea would be to merge several feeds and then sort them by a common parameter (e.g. price).

            Any help would be appreciated. Thanks.
              • 18338
              • 31 Posts
              Quote from: Philoe at Aug 29, 2009, 04:37 AM

              Tried your suggestion....

              Unfortunately,
              get now following error code:
              PHP error debug
              Error: mb_convert_encoding() [function.mb-convert-encoding]: Unable to detect character encoding
              Error type/ Nr.: Warning - 2
              File: /public_html/website/assets/snippets/FeedX/classes/feedx.class.inc.php
              Line: 104
              Line 104 source: return mb_convert_encoding($output, $modx->config[’modx_charset’], ’auto’);

              tnx so far,
              Philoe

              I am having the same issue, and the proposed fix has not solved it in my case either. Otherwise FeedX is making my life better in lots of small ways.
                • 18338
                • 31 Posts
                I posted too soon, my stream is encoded in iso-8859-1


                I am getting the same error though:

                Error: mb_convert_encoding() [function.mb-convert-encoding]: Unable to detect character encoding
                Error type/ Nr.: Warning - 2


                I get this error when parsing the description field of this feed: http://appalshop.org/store/index.php?main_page=rss_feed&feed=featured
                  • 4310
                  • 2,310 Posts
                  I couldn’t get FeedX to work with any feed that wasn’t encoded as UTF-8.
                  I think that was the way Brian wrote it.
                  Keep meaning to take a deeper look, but finding the time is always the challenge >:(
                    • 18338
                    • 31 Posts
                    Turns out that it was an issue with the feed rather than FeedX.

                    I think this is a great snippet, I would be interested in putting a little bit of money towards the cost to have someone look over the code and then package it up for the repository if there are no glaring bugs. This work is worth keeping alive -- I intend to use it extensively on the site I’m building right now.
                      • 27
                      • 117 Posts
                      Hi, Im using FeedX to display a Blogspot Atom feed, it works very well - apart from [+PUBDATE+] which doesnt work at all, there was some mention of it early in this thread with reference to phx, but the plain version aint working for me - anything special about Blogspot? it works fine on a flickr feed. TIA.