Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 83454 invoked from network); 12 Feb 2004 02:39:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Feb 2004 02:39:47 -0000 Received: (qmail 8915 invoked by uid 500); 12 Feb 2004 02:39:25 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 8847 invoked by uid 500); 12 Feb 2004 02:39:24 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 8824 invoked from network); 12 Feb 2004 02:39:24 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 12 Feb 2004 02:39:24 -0000 Received: (qmail 19094 invoked by uid 65534); 12 Feb 2004 02:39:32 -0000 Received: from a183069.studnetz.uni-leipzig.de (EHLO gmx.de) (139.18.183.69) by mail.gmx.net (mp010) with SMTP; 12 Feb 2004 03:39:32 +0100 X-Authenticated: #3483660 Message-ID: <402AE779.7050505@gmx.de> Date: Thu, 12 Feb 2004 03:39:53 +0100 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: what is the woody form binding encoding? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sending a mail twice is worse than sending it in HTML format ;-) I answer on the HTML mail as in the other mail there seem to be problem with line endings. I don't know what exactly you have configured, but the default encoding used in Cocoon for serialization should be UTF-8 (have a look on the serializer declarations in the components section, UTF-8 is default, if nothing is specified). But the default for the form-encoding is set in web.xml, if not set it's ISO-8859-1, but maybe this depends also on your servlet container or JVM. The problem is a mismatch between the both. Therefore a fix was added before release Cocoon 2.1.3, that set's the default serializer encoding (if nothing is specified) to the default form-encoding. Of course it's difficult to say what exactly is wrong with your setup as many issues might play a role. But UTF-8 everywhere should work also with Chinese characters. What encoding has the form on the browser? And is this recognized correctly by the browser? Are you sure the resulting XML file is wrong and it's not maybe only a viewing problem when the editor can't handle the encoding? Joerg On 11.02.2004 10:31, ? ?? wrote: > I saw the woody's binding samples and use dom to save form data.I modified js like: > if (isbind=="true") { > document = loadDocument(documentURI); > // bind the document data to the form > form.load(document); > } > // shows the form to the user until is validated successfully > form.showForm(formname+"-display"); > > if (form.binding != null){ > // bind the form's data back to the document > form.save(document); > cocoon.sendPage(formname+"-save",{"data":document}); > } > > Object document is a dom object then. > I use a pipeline to display the result: > > > > > Everything goes fine until I enter Simplyfied Chinese in the form,the xml result > apear wrong encoding character: > * * *test* > * * *???�???* <--error here > the form encoding is unicode. > If I use action to get the value from the context using JXPathContext is the > same result? > It must be woody form binding encoding problem. > What can I do to solve the problem? > > roy huang