A form was submitted in the windows-1252 encoding

前端 未结 1 1677
青春惊慌失措
青春惊慌失措 2021-02-15 19:38

I am getting the following warning in the JS tab of the Firefox web console (Ctrl + Shift + K)

A form was submitted in th

1条回答
  •  有刺的猬
    2021-02-15 19:49

    Based on the comment, it seems obvious that the server specifies the encoding as ISO-8859-1 in HTTP headers. You cannot override this in HTML for the document itself. You can, however, use the accept-charset=utf-8 attribute in the form tag to specify the character encoding of the form data submission.

    To change the HTTP headers, you need to do something at the server level. This may mean creating or editing a .htaccess file, or something else.

    P.S. The Accept-Encoding header is unrelated to this. It does not specify character encoding but a transfer encoding for the data.

    0 讨论(0)
提交回复
热议问题