Well, try this, paste data from a MS Word document into a text area and submit 
it. Make sure you have some nice apostrophe's or some non-english characters 
in there. UTF-8 away! I guarantee you it will be corrupt. I never tracked 
down why exactly, but the notion that browsers always submit form data 
properly SEEMS to be untrue. 

Specifically as near as I got to figuring out the problem the page was served 
up as ISO-8859-1. The text pasted into the textarea was UTF-8 (though there 
is no way to determine what the clipboard might have done to the encoding). 
The result was gobbledygook. That is to say the browser submitted a response 
which it claimed was coded with the ISO-8859-1 character set. Everything in 
the textarea HAD an ISO-8859-1 representation. The data in that textarea sure 
wasn't ISO-8859-1 when it got to the server!

I have verified that on my linux box Konqy NS6, NS7 and Mozilla 1.4 all 
exhibit identical behaviour. 

The moral of the story is that finding these bugs is WAY hard, and no browser 
is character set bulletproof yet... 

On Wednesday 26 November 2003 9:26 am, Steve Willer wrote:
> On Wed, 26 Nov 2003, [iso-8859-1] Anthony Gardner wrote:
> > HTML's <textarea> doesn't transform UTF-8 chars back
> > into readable format as when viewing a normal HTML
> > page.
> >
> > The UTF-8 char appears in <textarea> as-is and on
> > resubmission to my DB, the UTF-8 char gets UTF-8'd ;-)
> > again by AxKit leading to a melange of mad chars.
>
> I'm confused (I haven't read the original thread). Why would you need to
> do any sort of UTF-8 conversion anywhere? All browsers except Navigator
> 4.7, I think, will give you UTF-8 and print UTF-8 properly if you declare
> the content-type correctly (which presumably axkit already does). I
> wouldn't imagine you have to do anything to make this work.
>
> I've tried pasting chinese chars into a textarea a year ago as a test. It
> worked fine.
>
> > Does anyone have any insight into this problem. This
> > part of my site is THE ONLY THING that make the whole
> > site tick and without it functioning correctly, my
> > time will have been totally wasted.
> >
> >
> >
> > ________________________________________________________________________
> > Want to chat instantly with your online friends?  Get the FREE Yahoo!
> > Messenger http://mail.messenger.yahoo.co.uk
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to