Tex Texin wrote:

I guess the way to think about it, is the FORM's accept-charset tells
the user agent the encodings the server accepts. In the POST to the
server, the user agent is telling the server the encodings it
accepts, and it is not resending the forms' accept-charset attribute.

People are welcome to try other browsers and report back the
accept-charset value. But I agree now, that we can't use the
accept-charset value to trigger the encoding, since it doesn't
necessarily represent the encoding of the data.

That's exactly what I'd expect. With POST and enctype='multipart/form-data', there's the option to mark each individual field with a different charset (assuming it's a text field). See 4.5 in RFC 2388. This means it gets the text/plain default in the absence of an explicit charset MIME parameter (which is also going to be the default if the Content-Type defaults to text/plain, which I'm pretty sure it does with multipart/form-data). I don't know if browsers actually implement this though, and don't have time to knock up a test case here.

In the absence of this, I'm not convinced there's actually a completely reliable way of working. ASCII is the only thing guaranteed to work according to the specs (at least, that's my reading), but some browsers will do strange things. If you really want to transport general character data from HTML FORMs, use multipart/form-data.

James

--
James Aylett
 Chief Technical Architect
 t 020 7535 9850 f 020 7535 9900
 w http://tangozebra.com/

Tangozebra may not be held responsible for the content of this email
as it may reflect the personal view of the sender and not that of the
company. Should you receive this email in error, please notify the
sender immediately and do not disclose copy or distribute it.

Tangozebra runs anti-virus software on all servers and workstations,
and cannot be held responsible for any infected files that you may
receive. Tangozebra advises all recipients to virus scan all emails,
and to eat five portions of fruit and vegetable daily.

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to