Here are some more explanation.
All parameters coming from a form are ISO-8859-1.

The form encoding parameter allows to convert the parameters from ISO-8859-1 to UTF-8.
And then the parameters are displayed correctly.
Note That the container parameter stays ISO-8859-1.


Then, In my java class, I only work with UTF-8, so I convert, each time I need to do it, my documents using getBytes("UTF-8"). That permit to override the container parameter.

I have noticed that if I changed the contaniner parameter to UTF-8, all is going bad. I think this is because this parameter is used with the form encoding parameter to manipulate the parameters coming from forms.
I'm lacking information to be more specific.



So this is the best use. All is going well after that and documents are all UTF-8.


The encoding attribute in the declaration of the documents is useless. So as the <xsl:output encoding.


If you want to change the form-encoding parameter dynamically in the sitemap, you can use the httpHeaderAction.



Lionel





FREDERIC MOSER wrote:

I did not know some settings have to be done in web.xml, here is what I
was looking for:
----------------------------------------
<init-param>
  <param-name>form-encoding</param-name>
  <param-value>UTF-8</param-value>
</init-param>
----------------------------------------

I uncommented it and now it works perfectly!

Thanks to you guys,


Fred


---- Messages d�origine ---- De: Jan Hoskens <[EMAIL PROTECTED]> Date: Mardi, Ao�t 3, 2004 8:29 am Objet: Re: Encoding problems


You may want to take a look at the wiki page: http://wiki.apache.org/cocoon/RequestParameterEncoding
I had this problem a while ago: http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109100902605917&w=2
I'm wondering what the best solution is and which encoding is preferred for handling special characters or when UTF-8 / ISO 8859-1 should/could be used.


Kind Regards,
Jan

[EMAIL PROTECTED] wrote:


FREDERIC MOSER wrote:


Hi,

I've got some encoding problems using the xhtml serializer, I don't
really understand .
(I use Mozilla on Win XP and my editor is set to use UTF-8)


Part 1: -------

I've got the following stylesheet:
----------------------------------------------------------------

----------------------


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="" target="l">http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<html>
<head>
<title>plop</title>
<link rel="stylesheet" type="text/css" href="simple.css"/>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
</head>
<body>
<h1>Monographie ���</h1>
<div>
<form method="post"

action="ModifierMonographie">>> ...

----------------------------------------------------------------

----------------------



If I use : <map:serialize type="html"/>, everything work but

the browser

detect my encoding as IS0-8859-1 (because we can't encode HTML

4.01 as

UTF-8 I guess??)


Did you check in the components section of your sitemap.xmap how

the


serializers are configured?

To supply HTML using UTF-8 you could use
-----------------------------------------------------------------

---------------------


<map:serializer name="html" mime-type="text/html; charset=utf-8"
logger="sitemap.serializer.html" pool-grow="2"
pool-max="64" pool-min="2"
src="org.apache.cocoon.serialization.XMLSerializer">
<doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public> <doctype-system>"

target="l">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>

  <omit-xml-declaration>yes</omit-xml-declaration>
  <omit-namespaces>yes</omit-namespaces>
  <encoding>UTF-8</encoding>
  <indent>yes</indent>
</map:serializer>
-----------------------------------------------------------------

---------------------





------------------------------------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


-- Lionel CRINE Ing�nieur Syst�mes Documentaires Soci�t� : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.46.06.90

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to