[thelist] Textarea issue when using charset=UTF-8

Andrew Clover and-evolt at doxdesk.com
Wed Jun 22 17:28:28 CDT 2005

John Walker <john_walker2002 at hotmail.com> wrote:

 > Here is the source for the page(s) just save as .JSP and you have the
 > jsp version with the noted change from above

Yeah, JSP has nothing to do with this case. You will want the
pageEncoding though, so anything output through Java comes out OK.

 > I am testing this against Netscape 4.79

You have my sympathies. I have not had to work with that - well... to
called it a buggy heap of crap would be far too charitable - for ages,
which has improved my lifestyle tremendously.

 > If testing as an HTML and you leave the meta tag in when you click the
 > button to see the "value" of what is in the textarea, the last
 > character '0' is dropped.

W. T. F!

It happens with a plain <input> too. And it can be cumulative, if you
hit reload sometimes more and more characters can disappear (presumably
it's assigning field.value= field.value).

I knew Netscape 4 had some quirks in its handling of forms in UTF-8 (or
any character set that isn't the system default), but this is very
broken even by N4's lamentable standards.

All I can suggest for now is to work around it by putting an JavaScript
form onsubmit handler in the page (on N4 only, eg. by sniffing
document.layers) that adds a load of padding (newlines?) on the end of
any field likely to be long, that your receiving JSP page can detect and
strip away.

Andrew Clover
mailto:and at doxdesk.com

More information about the thelist mailing list