Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 32536 invoked from network); 29 Sep 2010 21:25:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 21:25:43 -0000 Received: (qmail 12673 invoked by uid 500); 29 Sep 2010 21:25:43 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 12518 invoked by uid 500); 29 Sep 2010 21:25:42 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 12511 invoked by uid 99); 29 Sep 2010 21:25:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 21:25:42 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [88.156.64.179] (HELO poczta.vectranet.pl) (88.156.64.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 21:25:32 +0000 Received: from [172.16.1.7] (095160200251.wroclaw.vectranet.pl [95.160.200.251]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: barbara_slupik@wro.vectranet.pl) by poczta.vectranet.pl (Postfix) with ESMTP id 62F008C33489 for ; Wed, 29 Sep 2010 23:25:11 +0200 (CEST) Message-Id: From: Barbara Slupik To: users@cocoon.apache.org In-Reply-To: <4CA302CA.4050508@kantl.be> Content-Type: multipart/alternative; boundary=Apple-Mail-1-398145413 Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: form encoding issues Date: Wed, 29 Sep 2010 23:25:06 +0200 References: <4CA302CA.4050508@kantl.be> X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1-398145413 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Hello I followed the instruction here = http://cocoon.apache.org/2.2/1366_1_1.html=20 . For cocoon-2.1.11 I set container-encoding UTF-8 form-encoding UTF-8 in my web.xml instead of org.apache.cocoon.containerencoding=3Dutf-8 and = =20 org.apache.cocoon.formencoding=3Dutf-8. I had to create =20 SetCharacterEncodingFilter as well. All works fine in utf-8. Barbara > Hi, > > I'm stumbling on a character encoding issue (cocoon-2.1.10) and =20 > really can't see why. Apparently, text input in a form is passed on =20= > in a wrong encoding. I've set Cocoon's default encoding in all =20 > thinkable places as UTF-8: > > web.xml: > =3D=3D=3D=3D=3D=3D=3D=3D > > Cocoon > > > container-encoding > UTF-8 > > > form-encoding > UTF-8 > > > > > sitemap.xmap > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > html" name=3D"xhtml" > pool-max=3D"${xhtml-serializer.pool-max}" =20 > src=3D"org.apache.cocoon.serialization.XMLSerializer"> > -//W3C//DTD XHTML 1.0 Transitional//EN public> > = http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd=20= > > UTF-8 > > > Yet, when I execute following pipeline: > > > > > > > > > > ...with following minimal source files: > > test.xml > =3D=3D=3D=3D=3D=3D=3D > > > > test.xsl (which will mainly echo the previous input) > =3D=3D=3D=3D=3D=3D > > version=3D"2.0"> > > > > > > > >
> > >
>

current input:

> > >
>
> > Yet, entering a string with accented characters, like e.g. 'tr=E8s =20 > annoying', this comes out as: 'tr=C3=A8s annoying'... > On the other hand, when entering the according URL = ( >) directly, the characters are passed on correctly. Does anyone =20 > know how this can be fixed? > > Any hints much appreciated! > > Ron Van den Branden > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > --Apple-Mail-1-398145413 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello

I = followed the instruction here http://cocoon.apache.o= rg/2.2/1366_1_1.html. For cocoon-2.1.11 I = set

   =  <init-param>
     =  <param-name>container-encoding</param-name>
&n= bsp;    =  <param-value>UTF-8</param-value>
   =  </init-param>

   =  <init-param>
     =  <param-name>form-encoding</param-name>
 &= nbsp;   =  <param-value>UTF-8</param-value>
   =  </init-param>

in my web.xml instead = of org.apache.cocoon.containerencoding=3Dutf-8 and = org.apache.cocoon.formencoding=3Dutf-8. I had to create = SetCharacterEncodingFilter as well. All works fine in = utf-8.

Barbara
= Hi,

I'm stumbling on a character encoding issue (cocoon-2.1.10) = and really can't see why. Apparently, text input in a form is passed on = in a wrong encoding. I've set Cocoon's default encoding in all thinkable = places as = UTF-8:

web.xml:
=3D=3D=3D=3D=3D=3D=3D=3D
<servlet>
&= lt;servlet-name>Cocoon</servlet-name>
<!-- .. = -->
<init-param>
<param-name>container-encoding</p= aram-name>
<param-value>UTF-8</param-value>
</init= -param>
<init-param>
<param-name>form-encoding</pa= ram-name>
<param-value>UTF-8</param-value>
</init-= param>
<!-- ... = -->
</servlet>

sitemap.xmap
=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
<map:serializer logger=3D"sitemap.serializer.xhtml" = mime-type=3D"text/html" name=3D"xhtml"
=             &n= bsp;  pool-max=3D"${xhtml-serializer.pool-max}" = src=3D"org.apache.cocoon.serialization.XMLSerializer">
<doctype-p= ublic>-//W3C//DTD XHTML 1.0 = Transitional//EN</doctype-public>
<doctype-system>http://ww= w.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system><= br><encoding>UTF-8</encoding>
</map:serializer>
Yet, when I execute following pipeline:

<map:match = pattern=3D"test">
<map:generate = src=3D"test.xml"/>
<map:transform = src=3D"test.xsl">
<map:parameter name=3D"use-request-parameters" = value=3D"true"/>
</map:transform>
<map:serialize = type=3D"xhtml"/>
</map:match>

...with following = minimal source files:

test.xml
=3D=3D=3D=3D=3D=3D=3D
<?xml= version=3D"1.0" encoding=3D"UTF-8"?>
<test/>

test.xsl = (which will mainly echo the previous input)
=3D=3D=3D=3D=3D=3D
<?= xml version=3D"1.0" encoding=3D"UTF-8"?>
<xsl:stylesheet = xmlns:xsl=3D"http://www.w3.org/1999/XSL/T= ransform" version=3D"2.0">
<xsl:param = name=3D"input"/>
<xsl:template = match=3D"/">
<html>
<head>
<meta = http-equiv=3D"Content-type" content=3D"text/html; charset=3DUTF-8" = />
</head>
<body>
<form action=3D"test" = accept-charset=3D"UTF-8" method=3D"get">
<input type=3D"text" = value=3D"{$input}" name=3D"input"/>
<input = type=3D"submit"/>
</form>
<p>current input: = <xsl:value-of = select=3D"$input"/></p>
</body>
</html>
<= /xsl:template>
</xsl:stylesheet>

Yet, entering a = string with accented characters, like e.g. 'tr=E8s annoying', this comes = out as: 'tr=C3=A8s annoying'...
On the other hand, when entering the = according URL (<http://loca= lhost:8888/test?input=3Dtr%C3%A8s+annoying>) directly, the = characters are passed on correctly. Does anyone know how this can be = fixed?

Any hints much appreciated!

Ron Van den = Branden

-----------------------------------------------------------= ----------
To unsubscribe, e-mail: users-unsubscribe@coco= on.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org<= /a>


= --Apple-Mail-1-398145413--