We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28173
    • 409 Posts
    Hi Perrine smiley

    I have exactly the same problem with my UTF-8 RSS Feed
    Did you solve the mistake ?
      • 23050
      • 1,842 Posts
      Hi Spheerys,

      We ran some tests with Heliotrope. Here is what we got :

      First, We don’t use auto in
      $output = mb_convert_encoding($output, $modx->config['modx_charset'], auto);

      we just use
      $output = mb_convert_encoding($output, $modx->config['modx_charset']);


      1- Feed in ISO and site in UTF-8 : you have to use &convEntities=`0` to get letters with accents (é)

      2- But when no auto in mb_convert_encoding function, we get é with feed in UTF-8

      So, if you add auto to mb_convert_encoding function, feed in UTF-8 work fine (with &convEntities=`1`) BUT feed in ISO don’t output letters with accents. Instead of végétale, I get vgtale.

      So, at that time, I didn’t find solution to use both UTF-8 and ISO feed on the same site.
        • 28173
        • 409 Posts
        Hummm ok thanks for the answer.... I will look for another solution because I have both ISO and UTF-8 feed... sad
          • 28173
          • 409 Posts
          After reflection, I’m using FeedX only with one utf8 rss feed
          So, I suppose I should use your tip smiley

          But in wich file should I have to change the code ?
          I found this code in assets/snippets/FeedX/classes/feedx.class.inc.php :
          		if (function_exists('mb_convert_encoding'))  // Convert output encoding, if available
          			return mb_convert_encoding($output, $modx->config['modx_charset'], 'auto');
          		else
          			return $output;

          I try to make this code :
          		if (function_exists('mb_convert_encoding'))  // Convert output encoding, if available
          			return mb_convert_encoding($output, $modx->config['modx_charset']);
          		else
          			return $output;

          But all accentuated characters are transformed in "Ú" etc...

          What’s wrong ?
            • 23050
            • 1,842 Posts
            Yes, it’s the right place for the mb_convert_encoding function.

            Do you have &convEntities=`1` in FeedX call ?
              • 28173
              • 409 Posts
              Yes I have it.
                • 23050
                • 1,842 Posts
                Mmm, did you empty the cache ?

                Are your .tpl encoded in UTF-8 ?
                  • 28173
                  • 409 Posts
                  yes I had empty the cache, but I don’t use template for FeedX
                  Unless your are talking about another template ?

                  In fact, all my site is on ISO-8859
                  Only one rss feed is on utf-8 and I want to parse it with FeedX
                    • 23050
                    • 1,842 Posts
                    I use .tpl with &preset

                    I guess you should make some tests : with or without auto in mb_convert_encoding function, with or without &convEntities...
                      • 33225
                      • 1 Posts
                      I’ve been using feedx for a while now, wonderful snippet, thank you.

                      But I just stumbled across a bug that is way over my head. (i can read php but I’m no programmer)
                      It seems that the URL decoder is inserting a space after every 100 characters. I found this when trying to parse a yahoo pipes feed, and tested the problem by passing 200 identical characters through the class and viewing the decoded output in the debug screen.

                      Is this anything y’all have seen. I’ve skimmed through this thread and didn’t see anything, but i might have missed it.
                      any help is appreciated.
                      Jacob