Re: [xsl] How can the encoding of form data be specified in XML/XSL

Subject: Re: [xsl] How can the encoding of form data be specified in XML/XSL
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 28 May 2003 10:03:05 +0100
Hi Carsten,

> We use XML/XSL in browser to generate some HTML data. XML and XSL
> uses ISO-8859-1 encoding. In some cases HTML forms are generated,
> the form data is submited with an URL-encoded get to the server.
> We found that IE browsers encode the formdata in UTF8 before its
> URL-encoded. Gecko browser just send ISO-8859-1.
> Is there a way to enforce a certain encoding of submitted data?

This is an HTML question rather than an XSLT one, since it's about how
the browser behaves when it submits a form. You might try using the
accept-charset attribute on the <form> element to specify the
character encodings that you're willing to accept. Something like:

  <form action="filterform.htm" accept-charset="ISO-8859-1">

Having said that, according to the HTML spec, browsers are supposed to
use the same character encoding when submitting a form as was used for
the HTML page itself. Perhaps IE is getting confused because you're
doing the transformation client-side or perhaps it just always submits
the form in UTF-8; it's hard to say without trying out the above.



Jeni Tennison

 XSL-List info and archive:

Current Thread