Reference Citations - HerongYang.com - v2.91, by Dr. Herong Yang
How does PHP determine the character encoding in browser POST request data?
'Basic Rules of Receiving Non-ASCII Characters from Input Forms' tutorial was cited in a stackoverflow forum post in 2016.
The Basic Rules of Receiving Non-ASCII Characters from Input Forms tutorial was cited in a stackoverflow forum post in 2016.
Subject: How does PHP determine the character encoding in browser POST request data? Date: Sep 8, 2016 Author: the_velour_fog Source: http://stackoverflow.com/questions/39381173 /how-does-php-determine-the-character-encoding-in -browser-post-request-data ... In regard to GET data, the W3C standard states Note. The "get" method restricts form data set values to ASCII characters. Only the "post" method (with enctype="multipart/form-data") is specified to cover the entire [ISO10646] character set. So with GET the browser seems to be locked into ASCII, if the form element has the attribute enctype="multipart/form-data" it seems the standard supports the larger charset [ISO10646]. And I guess because it is closer to a pure bitstream, the default Content-type of application/x-www-form-url-encoded supports all character encodings. in particular this article states: http://www.herongyang.com/PHP/Non-ASCII-Form-Basic-Rules.html URL encoding converts all non ASCII bytes in the form of "%xx", "xx" is the HEX value of the byte. So this seems to explain what charsets the browser can possibly send, but not how it instructs PHP as to what actual charset it sent. (with the exception of GET, which PHP will know can only be ASCII). O Other wise from what I can understand there is essentially no direct guidance from the browser as to the character encoding of the form data it's sending. ...
Table of Contents