Bonjour je viens de réaliser un test sous cocoon qui transforme un
fichier XML codé en UTF-8 en page HTML
dans mon sitemap j'ai :
<map:pipeline>
<map:match pattern="index.html">
<map:generate src="xml/articles.xml">
</map:generate>
<map:transform src="xsl/index.xsl"/>
<map:serialize type="html">
<encoding>UTF-8</encoding>
</map:serialize>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="article.html">
<map:generate src="xml/articles.xml"/>
<map:transform src="xsl/article.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="html">
<encoding>UTF-8</encoding>
</map:serialize>
</map:match>
</map:pipeline>
mon fichier articles.xml en UTF-8 commence par
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ARTICLES SYSTEM "article.dtd">
<ARTICLES>
mon fichier index.xsl en UTF-8 commence par
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>
aprés modification des serializers par défaut comme-suit
<map:serializer name="html" mime-type="text/html; charset=UTF-8"
src="org.apache.cocoon.serialization.HTMLSerializer">
<encoding>UTF-8</encoding>
<omit-xml-declaration>true</omit-xml-declaration>
</map:serializer>
<map:serializer name="xml" mime-type="text/xml; charset=UTF-8"
src="org.apache.cocoon.serialization.XMLSerializer"
pool-max="32" pool-min="16" pool-grow="4"
logger="sitemap.serializer.xml">
<encoding>UTF-8</encoding>
</map:serializer>
J'obtiens dans mon Fichier resultat HTML
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Intranet SOGEDIF</title>
</head>
<body>
<table border="0">
<tr>
<td valign="top" width="800"><a href="index.html">accueil</a> |
<a
href="http://localhost:8888/sogedif/article.html?f_index=Pause
caf%C3%A9">Pause café</a> |
<a href="index.html">accueil</a> |
<a href="index.html">accueil</a> |
<a href="index.html">accueil</a></td>
</tr>
</table>
Ma question est : pourquoi cet encodage dans le lien suivant
<a href="http://localhost:8888/sogedif/article.html?f_index=Pause
caf%C3%A9">Pause café</a>
Il me pose ensuite problème car mon second pipeline interprète le
paramètre f_index
comme : Pause café
Comment conserver de l'UTF-8 de bout en bout ?
D'avance merci
---------------------------------------------------------------------
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]