cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject issue with form encoding C2.2
Date Wed, 06 Jun 2012 11:09:46 GMT
Hi all,

Just wanted to have a short discussion on an issue that I wasted quite some hours on.  Let
me first explain that I configured my cocoon block with following two properties as per http://cocoon.apache.org/2.2/1366_1_1.html
:

org.apache.cocoon.containerencoding=UTF-8
org.apache.cocoon.formencoding=UTF-8


Recently I created a form showing pre-populated data from an xquery.  One form field contained
the Ohm Ω character and the browser rendered if fine.  But I had to post the data back to
the server and the Ohm sign got corrupted.

From firebug I could see following:
descriptiveTitle N-channel 25 V 2.85 mΩ logic level MOSFET in LFPAK using NextPower technology
magCode             R73
specificationStatus          Product

From flowscript:
descriptiveTitle=N-channel 25 V 2.85 mΩ logic level MOSFET in LFPAK using NextPower technology
specificationStatus=Product
magCode=R73



So next I started looking at cocoon sources using URLDecoder and I had a suspicion that NetUtils
might be responsible for the issue. But that didn’t seem to be the issue.  I managed to
find out that the value I defined for formencoding is not actually used.  The reason is that
it also is set in cocoon-core and either it doesn’t get overwritten or the property from
cocoon-core is overwriting my own property value.

nxp10009@NXL01262 /c/development/workspaces/cocoon22/trunk/core
$ find . -name *.properties | xargs grep "formencoding"
./cocoon-core/src/main/resources/META-INF/cocoon/properties/core.properties:org.apache.cocoon.formencoding=ISO-8859-1

So what’s the best way to fix this?


Mime
View raw message