It turns out the the issue of encoding in form submission is more complex than we thought. Basically, when a form is submitted, there is no reliable way to detect the character encoding. With GET, modern browsers seem to be mostly sending UTF-8 in the submitted URL, at least if the encoding of the source document is UTF-8 as well. With POST, the encoding is not sent, as it probably should be, along with the content-type of the HTTP message body, so it is up to the application writer to do an educated guess about the encoding. The "accept-charset" attribute on HTML form elements seems to work with Mozilla 1.5, but not with IE 6.
The following page gives some technical information about the multiple incompatibilities between browsers:
http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html
In most cases, with modern browsers, using UTF-8 for the page encoding and to decode form parameters is a good choice. I got good results with Mozilla 1.5 and IE 6 by forcing OXF to decode form parameters in UTF-8.
The current fix involves this:
o If the browser says that is supports the utf-8 encoding, send HTML pages encoded in UTF-8 instead of the default ISO-8859-1. This will be a better default for "international" (as they say in the US) users.
o When decoding URL and form parameters, again if the browser supports UTF-8, use UTF-8 as well.
We should be able to have a patch with those changes by early next week. Alexander, it would be great if you could let us know what requirements you have regarding supported browsers, etc.
Regards,
-Erik
[EMAIL PROTECTED] wrote:
> Dear All, > > Please help me to make Hello examle work not only for English names but > for Russian also. I get something like this: "Hello > Александр! " > > May be there is a general server parameter that force generation of > XML/HTML in UTF-8 format? > Please point me in step by step way if this is not too hard for you. > > I am new in Web/XML/App Server technology, but it seems that OXF can help > us to solve form gathering problem > > Thanks in advance, Alexander Stoulov
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
