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

 About This Book

 Reference Citations in 2017

Reference Citations in 2016

 如何迫使java服务器只接受tls1.2并拒绝tls1.0和tls1.1连接

 cliente soap java

 Android Hints Tweaks and Tips

 [Tutorial] - Play HD Videos with ffplay

 Comment ouvrir les fichiers XML

 Počítačová síť a internet

 Deploying Embarcadero Delphi XE7 and C++Builder XE7 Applications

 Change XSD root namespace in BizTalk

 Заставить пример java + ssl работать

 字符编码的故事:ASCII,GB2312,Unicode,UTF-8,UTF-16

 General Relativity for Laypeople – A First Primer

 XML Dynamic Key Encryption Approach

 Подключение к MS SQL Server из NetBeans

 TCP SSL 서버 성능테스트 관련 질문

 Tạo cửa sổ con nằm trong cửa sổ tab chính trong Java

 FAQ DMP Compatibilité

How does PHP determine the character encoding in browser POST request data?

 Implementing the Information Security using Modified RSA

 Recording Video of an Android Device

 Getting error for SOAP request "InvalidSecurity: ..."

 SSL证书链包如何工作?

 Finding JNDI/LDAP Connection Security Protocol

 how to import x509.pem pk8 file into jks(keystore)

 Reference Citations in 2015

 Reference Citations in 2014

 Reference Citations in 2013

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003

 PDF Printing Version