Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accent issue with rss feed #48

Closed
JPnux opened this issue Feb 11, 2025 · 6 comments
Closed

Accent issue with rss feed #48

JPnux opened this issue Feb 11, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@JPnux
Copy link

JPnux commented Feb 11, 2025

Hello and thank you for version 3. It's amazing ! Very happy to see active development resuming ! Wonderful project.

Feedcord works well. I have 3 RSS feeds with different webhooks. Everything works.
I just have one problem with accents in an RSS feed (French language).
Here is the RSS feed : https://www.easybourse.com/feeds/news/fr/

It appears like this on Discord:
Image

Is there a solution to have the accents displayed correctly?

I checked the feed on this page : https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fwww.easybourse.com%2Ffeeds%2Fnews%2Ffr%2F

Result :
This is a valid RSS feed.
Recommendations
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
Feeds should not be served with the "text/html" media type

The problem is here > Your feed appears to be encoded as "UTF-8", but your server is reporting "ISO-8859-1"
Help here ? https://validator.w3.org/feed/docs/warning/EncodingMismatch.html

I notice this is a SERVER PROBLEM. Is there a chance you can correct it ?

Thank you

Below, output of "curl https://www.easybourse.com/feeds/news/fr/ "

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <language>fr</language>
    <title>EasyBourse : bourse en ligne, actualités financières</title>
    <description>Actualité de la bourse de Paris : cours et cotations des marchés financiers, CAC40, investissements, interviews, indices et devises</description>
    <image>
      <url>https://www.easybourse.com/public/website/img/template/logo_easybourse.gif</url>
      <title>EasyBourse</title>
      <link>https://www.easybourse.com</link>
    </image>
    <generator>EASYBOURSE.COM</generator>
    <link>https://www.easybourse.com</link>
    <copyright>Copyright 2010 - eaybourse.com</copyright>
    <item>
      <title>Bénéteau: Oddo BHF relève son objectif de cours</title>
      <description><![CDATA[(CercleFinance.com) - Tout en maintenant son opinion 'neutre' sur B&eacute;n&eacute;teau, Oddo BHF rel&egrave;ve son objectif de cours de 11 &agrave; 12 euros, dans le sillage d'estimations de BPA sur la p&eacute;riode 2024-2026 rehauss&eacute;es de 30% en moyenne pour le fabricant de navires de plaisance.<br />
Le bureau d'&eacute;tudes salue la publication d'un...]]></description>
      <pubDate>Tue, 11 Feb 2025 13:05:00 +0100</pubDate>
      <link>https://www.easybourse.com/marches/valeurs/recommandations-brokers/1501233/beneteau-oddo-bhf-releve-son-objectif-cours.html</link>
      <guid isPermaLink="false">brokers_1501233</guid>
      <category><![CDATA[Distribution]]></category>
    </item>
@Qolors
Copy link
Owner

Qolors commented Feb 11, 2025

are you only experiencing the accents displaying wrong in the title?

@Qolors
Copy link
Owner

Qolors commented Feb 11, 2025

my bad I see it is also wrong in the footer for your image.. let me take a further look in to this

@Qolors Qolors self-assigned this Feb 11, 2025
@Qolors Qolors added the bug Something isn't working label Feb 11, 2025
@Qolors
Copy link
Owner

Qolors commented Feb 11, 2025

When building our post data we sanitize our description content but leave the rest as it is. This is why the description shows accents correctly but the title and footer do not

I should have an update pushed for this soon

@Qolors Qolors closed this as completed in 446385d Feb 11, 2025
@JPnux
Copy link
Author

JPnux commented Feb 12, 2025

hello thans for your efforts

the problem is still present

Image

@Qolors
Copy link
Owner

Qolors commented Feb 12, 2025

hey @JPnux I'm reopening this. I fixated on the wrong thing here.

As your info shows, their server reports "ISO-8859-1" encoding and the RSS shows "UTF-8" encoding. FeedCord is reading the server response, thus using ISO-8859-1 encoding on a UTF-8 encoded feed and causing garbled text. Apologies again as I glanced this portion too quickly.

The best solution would be to notify the site owner of this. If they changed it then it would just work normally.

However, I will implement a small patch that compares the server headers & feed prologue, and trusts the feed information for decoding if they're different. This could be helpful in the future for any other misconfigured server/feeds

@Qolors Qolors reopened this Feb 12, 2025
@Qolors
Copy link
Owner

Qolors commented Feb 12, 2025

I was able to remedy the issue by comparing the Server Encoding & The Feed Encoding - if they are different, trust the Feed encoding. I was able to validate the results on my end

Image

This should help handle it and any future feeds that are misconfigured like this

Expect this patch to be rolled out today after I determine the fix for #50

@Qolors Qolors closed this as completed in 854f2d0 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants