We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    Hello
    I’m trying to use FeedX on Evolution and I’m getting the following error:
    Error: mb_convert_encoding() [function.mb-convert-encoding]: Unable to detect character encoding
    Error type/ Nr.: Warning - 2
    File: /Users/Marco/Sites/sites/amsworld.ch/assets/snippets/feedx/classes/feedx.class.inc.php
    Line: 118
    Line 118 source: return mb_convert_encoding($output, $modx->config[’modx_charset’], ’auto’);

    any ideas what’s causing this?

    Thanks
      • 4310
      • 2,310 Posts
      Bet you’re trying to read a non utf-8 feed.
      FeedX seems to only want utf-8 >:(
      Keep trying to find the time to see why and change it.
        • 19889
        • 616 Posts
        are there any alternatives for modx? what’s the easiest way to check what charset the feed is? by the way, it’s this rss feed
        http://www.iaaf.org/rss/rss.xml
          • 20413
          • 2,877 Posts
          Have you tried using
          &convEntities=`1`


          And try

          Post by: ApoXX on 27-Apr-2007, 04:03 PM
          @redstormj:
          
          I'm not sure why encoding conversion was failing, possibly wunderground was sending some invalid ascii character. If you would rather use the wunderground feed, you should be able to get it working by changing the following:
          Code:
          return mb_convert_encoding($output, $modx->config['modx_charset'], 'auto');
          to
          Code:
          return $output;


          http://modxcms.com/forums/index.php?action=printpage;topic=12657.0
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 19889
            • 616 Posts
            Quote from: mrhaw at Oct 15, 2009, 05:31 PM

            Have you tried using
            &convEntities=`1`


            where do I put that - in the snippet call?
              • 4310
              • 2,310 Posts
              That feed is utf-8, just do view source, so it should work with FeedX
                • 20413
                • 2,877 Posts
                Yes in snippet call! I don’t remember what is default so try with 0 too!
                  @hawproductions | http://mrhaw.com/

                  Infograph: MODX Advanced Install in 7 steps:
                  http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                  Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                  http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                  • 4310
                  • 2,310 Posts
                  Just tested it and it works smiley
                  Here’s my snippet call :
                  [!FeedX? &url=`http://www.iaaf.org/rss/rss.xml` &cacheTime=`10` &outerChunk=`feedX_start` &cacheType=`0` &maxElements=`CHANNEL(1)`!]

                  Here are the template chunks :
                  feedX_start
                  {{RSS->feedX_outer}}

                  feedX_outer
                  {{CHANNEL->feedX_inner}}

                  feedX_inner
                  {{ITEM->feedX_item}}

                  feedX_item
                  <a  title="[+TITLE+]" href="[+LINK+]">[+TITLE+]</a><br />
                  <span class="date">Date- [+PUBDATE+]</span><br /><br />
                  <span class="comment">[+DESCRIPTION+]</span><br /><br />

                  You can add &debug=`1` to your snippet call to see what’s happening.
                    • 19889
                    • 616 Posts
                    this seems not to produce a modx error:
                    return mb_convert_encoding($output, $modx->config['modx_charset'], 'UTF-8');
                    while
                    this does:
                    return mb_convert_encoding($output, $modx->config['modx_charset'], 'auto');


                    there are still some decoding issues - this is the text I’m getting:

                    Tadese makes it four in a row - MENâs RACE REPORT - World Half Marathon, Birmingham
                    11 October 2009 - Birmingham, UK - Eritean Zersenay Tadese, the outstanding pre-race favourite confirmed the predictions in a time of 59:35 taking his fourth successive World title, delivered thanks to a sustained attack which began some 10 kilometres into todayâs IAAF / EDF Energy World Half Marathon Championships in Birmingham.

                    there’s seems to be an issue with hyphens?
                      • 20413
                      • 2,877 Posts
                      @Bunk do you have any fresh atom tpl’s to share! grin
                        @hawproductions | http://mrhaw.com/

                        Infograph: MODX Advanced Install in 7 steps:
                        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower