NYCPHP Meetup

NYPHP.org

[nycphp-talk] Charsets are still driving me nuts

Dan Cech dcech at phpwerx.net
Thu Mar 6 15:10:52 EST 2008


Wellington Fan wrote:
> Does anyone have experience with using the the "accept-charset" attribute on
> FORMs?
> 
> http://www.w3.org/TR/REC-html40/interact/forms.html#adef-accept-charset
> 
> I read this, but I am not sure what the net result is:
> "The client must interpret this list as an exclusive-or list, i.e., the
> server is able to accept any single character encoding per entity received."
> 
> So guess it's not solving the initial question, but might be part of the
> solution...?

In theory the data sent by the client should be in one of the 
'acceptable' character sets.  In practice I am sure there are plenty of 
clients which either don't obey this directive or ignore it altogether.

I'm not sure if it might be useful as a way of hinting to modern clients 
that you would like input in utf-8 (or another character set), though I 
believe that most browsers will attempt to provide form data in the same 
character set as the containing page anyway.

Dan



More information about the talk mailing list
Automatic Email Organization without missing anything!