Open adeinega opened 10 months ago
From what I can tell, the application/x-www-form-urlencoded
content type implies UTF-8 encoding, so it is not needed to include the charset
.
https://url.spec.whatwg.org/#application/x-www-form-urlencoded
https://url.spec.whatwg.org/#application/x-www-form-urlencoded
Section 3.2.2 Tokens states that
However, the following example does not include UTF-8 as character encoding
it should look like as
the same applies for all other similar examples in the spec.
How is this important? In some (rare) cases, it can lead to interoperability issues as app servers & frameworks that run an AS do not necessarily use "UTF-8" as a default encoding character, as an example, Java Servlets use "ISO-8859-1". So, it is better for a client to always specify the character explicitly.