You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2008/01/22 10:06:13 UTC
Re: Cforms and Character Encoding
On 08.12.2007 13:37, Peter Sparkes wrote:
> I am using Cforms in Cocoon 2.1.10 to amend an XML file. The character
> encoding is UTF-8
>
> The Euro sign € gets converted to € and UK pound sign £ to £
>> from the field widget. I am using the saveDocument function from the
> samples and have set
> transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.ENCODING,
> "UTF-8");
>
> Please, how do I correct this problem?
I can't tell you how to correct it since I don't know where it goes
wrong. But what happens is that a 2-byte-character (as in UTF-8) is read
byte by byte (as in ISO-8859-1). Maybe it is only a problem with
watching the file without an encoding-aware editor which reads it in
ISO-8859-1?
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cforms and Character Encoding
Posted by Peter Sparkes <pe...@didm.co.uk>.
Thanks for the advice
I have tested with various versions of IE and Firefox and all' fine
Peter
> Peter Sparkes wrote:
>> The problem turned out to be in web.xml
>> I amended
>> <param-name>form-encoding</param-name>
>> <param-value>ISO-8859-1</param-value>
>> To
>> <param-name>form-encoding</param-name>
>> <param-value>UTF-8</param-value>
>> and now everything is in UTF-8 and works properly
>
> Just a word of caution: make sure you test your forms on every
> possible web browser.
> I've had trouble with this setting in the past.
>
>
> Tobia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cforms and Character Encoding
Posted by Joerg Heinicke <jo...@gmx.de>.
On 23.01.2008 03:51, Tobia Conforto wrote:
>> The problem turned out to be in web.xml
>> I amended
>> <param-name>form-encoding</param-name>
>> <param-value>ISO-8859-1</param-value>
>> To
>> <param-name>form-encoding</param-name>
>> <param-value>UTF-8</param-value>
>> and now everything is in UTF-8 and works properly
>
> Just a word of caution: make sure you test your forms on every possible
> web browser. I've had trouble with this setting in the past.
I've never encountered a browser-specific problem of that kind.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cforms and Character Encoding
Posted by Gabriel Gruber <Ga...@workflow.at>.
> Peter Sparkes wrote:
> > The problem turned out to be in web.xml
> > I amended
> > <param-name>form-encoding</param-name>
> > <param-value>ISO-8859-1</param-value>
> > To
> > <param-name>form-encoding</param-name>
> > <param-value>UTF-8</param-value>
> > and now everything is in UTF-8 and works properly
>
> Just a word of caution: make sure you test your forms on every
> possible web browser.
> I've had trouble with this setting in the past.
Our enterprise product which heavily uses Cforms and cocoon has the
form-encoding set to UTF-8 which works for us quite well :-)
Gabriel
Re: Cforms and Character Encoding
Posted by Tobia Conforto <to...@linux.it>.
Peter Sparkes wrote:
> The problem turned out to be in web.xml
> I amended
> <param-name>form-encoding</param-name>
> <param-value>ISO-8859-1</param-value>
> To
> <param-name>form-encoding</param-name>
> <param-value>UTF-8</param-value>
> and now everything is in UTF-8 and works properly
Just a word of caution: make sure you test your forms on every
possible web browser.
I've had trouble with this setting in the past.
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cforms and Character Encoding
Posted by Peter Sparkes <pe...@didm.co.uk>.
Thanks Joerg,
The problem turned out to be in web.xml
I amended
<init-param>
<param-name>form-encoding</param-name>
<param-value>ISO-8859-1</param-value>
</init-param>
To
<init-param>
<param-name>form-encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
and now everything is in UTF-8 and works properly
The problem was that the form was sending UTF-8 but it was being read as
ISO-8859-1
Peter
> On 08.12.2007 13:37, Peter Sparkes wrote:
>
>> I am using Cforms in Cocoon 2.1.10 to amend an XML file. The
>> character encoding is UTF-8
>>
>> The Euro sign € gets converted to € and UK pound sign £ to £
>>> from the field widget. I am using the saveDocument function from the
>> samples and have set
>> transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.ENCODING,
>> "UTF-8");
>>
>> Please, how do I correct this problem?
>
> I can't tell you how to correct it since I don't know where it goes
> wrong. But what happens is that a 2-byte-character (as in UTF-8) is
> read byte by byte (as in ISO-8859-1). Maybe it is only a problem with
> watching the file without an encoding-aware editor which reads it in
> ISO-8859-1?
>
> Joerg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org