André Warnier wrote:
The last reference (which I did not know) is excellent. Thank you.
But the other two references, if you are perseverating over them, are in
my view not good references worth perseverating over.
The article at
> http://wiki.apache.org/tomcat/Tomcat/UTF-8
is incorrect. The second part (Alternative) has been recently corrected
for the better, but the very premise of the article is wrong and
misleading. It has been recently shown in a thread in this same forum
that one does not normally need a filter, and I would submit that using
a filter as indicated will corrupt data in some instances.
The first solution is horrible as a standard approach but is a useful
example of how you might recover mangled UTF-8 text.
You could also add that a filter should be unnecessary but that many
developers prefer it as it 'fixes' all pages with a few lines of code
rather than having to fix every single page.
In the article at
> http://wiki.apache.org/tomcat/FAQ/CharacterEncoding
there is also a problem in the form shown under the title
How can I test if my configuration will work correctly?
As demonstrated by a recent thread here also, the <form> tag as shown,
is missing a
enctype="multipart/form-data"
attribute.
Agreed. Feel free to fix it.
This will cause Tomcat to misinterpret the form data in some cases.
One could also argue that adding an attribute
accept-charset="UTF-8"
would make it even more failsafe.
Wouldn't do any harm.
In addition, the article also repeats a mistake often seen,s which is to
tell people that it's ok to send form data via a GET and use non
US-ASCII data. This is a receipe for problems, see the first mentioned
article at java.sun.com.
There you get into a grey area in the various specs. Probably the best
solution is a comment that says POST is easier to control than GET but if
you are stuck with GET for whatever reason then...
Now, I know that these are Wiki articles and can be corrected by anyone,
but isn't that a problem ? For better or worse, these articles are used
as reference by Tomcat users. See your own response above.
If someone goes ahead and posts incorrect technical stuff there, there
is a problem, no ?
I mean that I, as a mere user, don't feel at ease going ahead and
modifying the Wiki article of someone else unilaterally, nor of posting
another one saying the previous one is all wrong. But maybe there
should be some form of authoritative control of the accuracy of what is
posted there ?
This is a community of which we are all members. We are all equally
responsible for keeping the Wiki relevant and accurate. Any and every
member of this community has an equal right to go and edit any Wiki article.
There was a long time when Wiki changes were not posted to the dev list so
no review took place. That has been fixed and all changes now get copied to
the dev list where they will be reviewed. Gross inaccuracies are likely to
be corrected quickly.
And yes, I could have made all the changes above myself rather than write
this but I really would like to see a few more people on this list take the
plunge and start updating the Wiki, particularly the FAQ.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]