Does accept_charset help in HTML forms?
The accept-charset attribute allows you to specify the encoding the server should receive the HTML form contents in. Does that help maintaining a consistent encoding in your web application?
Short answer: No.
I already covered that topic in my last talk about charsets and encodings on the last International PHP Conference and now documented it in my charset encoding FAQ. Find the longer answer to this question there.
Trackbacks
Comments
-
Maarten at Wed, 11 Feb 2009 16:07:38 +0100
So,nice to know, but what if the page is set to utf-8, can you then be certain content entered is always utf-8, and same for other encodings? I seem to recall some browsers sending whatever their own setting is.
Link to comment
There is also ofcourse the other browsers that are outside of your testing set. -
Maarten at Wed, 11 Feb 2009 16:09:25 +0100
sorry, found this in your FAQ now... "Which charset does $client send?"
Link to comment
Fields with bold names are mandatory.
Charset vs. Encoding on Sun, 24 May 2009 12:55:43 +0200 in Kore Nordmann - PHP / Projects / Politics
One of the most common errors when dealing with strings is to confuse
charset with encoding - and I do understand that very well. So how could
that happen?