Encoding flux rss quel norme?

Consultez la formation au référencement naturel Google de WebRankInfo / Ranking Metrics


passion
WRInaute accro
WRInaute accro
 
Messages: 2422
Inscription: Ven Jan 06, 2006 20:18

Encoding flux rss quel norme?

Message le Dim Mai 14, 2006 22:40

Bonsoir,
Je suis entrain de réaliser un flux rss mais lorsque je viens de le valider sur -http://validator.w3.org il me dit ceci:

You can also try changing your character encoding to a more liberal encoding. For example, if you have this at the top of your feed:

<?xml version="1.0" encoding="utf-8"?>

Try changing it to this:

<?xml version="1.0" encoding="iso-8859-1"?>

mon flux est : -http://www.voyance-isabel.com/flux_rss/site-de-voyance.xml

En faite, j'avais un problème de "é" et "à" qui me marque "?"
Pourriez-vous m'aider?
Lequel dois-je choisir comme encoding?

shrom
WRInaute passionné
WRInaute passionné
 
Messages: 865
Inscription: Lun Juil 05, 2004 22:37

Message le Lun Mai 15, 2006 2:11

Si tu as des problèmes avec les accents, c'est que ton fichier est en iso-8859-1, il faut donc mettre:
<?xml version="1.0" encoding="iso-8859-1"?>


passion
WRInaute accro
WRInaute accro
 
Messages: 2422
Inscription: Ven Jan 06, 2006 20:18

Message le Lun Mai 15, 2006 8:40

Aparavant j'étais en Utf et j'ai suivi tes conseils en Iso, aprés testé par "validator", voilà ce qu'il me dit:



Your feed appears to be encoded as “foo”, but your server is reporting “bar”
Explanation

The XML appears to be using one encoding, but the HTTP headers from the web server indicate a different charset. Internet standards require that the web server's version takes preference, but many aggregators ignore this. Note that, if you are serving content as 'text/*', then the default charset is US-ASCII, which is probably not what you want. (See RFC 3023 for technical details.)

RSS feeds should be served as application/rss+xml (RSS 1.0 is an RDF format, so it may be served as application/rdf+xml instead). Atom feeds should use application/atom+xml. Alternatively, for compatibility with widely-deployed web browsers, any of these feeds can use one of the more general XML types - preferably application/xml.

Another possible cause is the use of single quotes to delimit the charset parameter in the http header, whereas the http definition of Basic Rules only permits the use of double quotes. The result is somewhat confusing messages such as:

Your feed appears to be encoded as “utf-8”, but your server is reporting “'utf-8'”

Solution

Either ensure that the charset parameter of the HTTP Content-Type header matches the encoding declaration, or ensure that the server makes no claims about the encoding. Serving the feed as application/xml means that the encoding will be taken from the file's declaration.

The W3C has published information on how to set the HTTP charset parameter with various popular web servers.

If you are unable to control your server's charset declaration, Character and Entity References may be used to specify the full range of Unicode characters in an feed served as US-ASCII.

Que dois-je faire?...je comprends l'anglais mais il me parle de truc US-ASCII...comprends pas!!!!
Voici, ma nouvelle ligne de script:

<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>etc......</title>
etc..................


Serious
WRInaute accro
WRInaute accro
 
Messages: 2438
Inscription: Lun Nov 21, 2005 18:29

Message le Lun Mai 15, 2006 9:49

Ajoute dans ton .htaccess la ligne suivante:
AddType application/xml .xml
ou mieux:
AddType application/rss+xml .rss
et change l'extension de ton flux en .rss


passion
WRInaute accro
WRInaute accro
 
Messages: 2422
Inscription: Ven Jan 06, 2006 20:18

Message le Lun Mai 15, 2006 10:00

Merci serious
J'ai essayé mais marche pas alors je suis revenu en .xml
Mon application est de la sorte:
<a type="application/rss+xml" href="feed.rss">http://www.voyance-isabel.com/flux_rss/site-de-voyance.xml</a>

Vous pouvez me dire si pouvez lire mon flux?????
Merci
-http://www.voyance-isabel.com/flux_rss/site-de-voyance.xml


Serious
WRInaute accro
WRInaute accro
 
Messages: 2438
Inscription: Lun Nov 21, 2005 18:29

Message le Lun Mai 15, 2006 18:00

<a type="application/rss+xml" href="http://www.voyance-isabel.com/flux_rss/site-de-voyance.xml">Actualites</a>


Formation recommandée sur ce thème :

Formation Référencement naturel Google : apprenez une méthode efficace pour optimiser à fond le référencement naturel dans Google de façon durable... Formation animée par Olivier Duffez et Fabien Facériès, experts en référencement naturel.

Tous les détails sur le site Ranking Metrics : programme, prix, dates et lieux, inscription en ligne.

Lectures recommandées sur ce thème :



Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités