From:  Rolf Wouters <rwmailing@gmail.com>
Date:  21 Dec 2005 05:09:35 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.editor
Subject:  

Re: Saving accents and umlauts using midas

NNTP-Posting-Host:  p548F705A.dip.t-dialin.net

Hi Robert

Thanks for answering my question, but I'm happy to tell you we've got 
the problem solved, and like most things in live, this one had a very 
simple solution.
I'll explain a little...

First of all, we're not saving our content to a database, we're saving 
it to an HTML page by means of the java servlet.
This servlet is called by posting an HTML-form with some hidden fields, 
one of which contains the content of the HTML page which was edited 
(which can be one looooooong string).

Now, the problem was that this java servlet assumes this string to be in 
ISO-8859-1 format, which is the encoding of the HTML page and thus 
interprets the data it retrieves with 'getParameter("content")' in that way.
By using 'request.setCharacterEncoding("UTF-8")' we told the servlet 
explicitly that the query (post) data is in UTF-8 format and it worked. 
  The great thing is, it even worked without breaking any of the other 
calls we made to the same servlet :-).

In the previous version, where we used the MS DHTML editor (which only 
runs on IE for Windows) not setting an explicit encoding for the 
ServletRequest didn't cause problems, but in Midas it somehow did.
My only explanation for this is that IE must have send the data as UTF-8 
anyway, or that it performs some additional encoding of its own.
(I've come to this conclusion, since none of the encodings were changed, 
untill now :-) )

Thanks anyway for your reply and your help.  Hopefully this information 
is usefull to others.

Greetz
Rolf