Keywords: Coding form gb2312 post utf8
Use the accept-charset attribute
The accept-charset attribute specifies the character set accepted by the server for processing form data.
The accept-charset attribute allows you to specify a series of character sets. The server must support these character sets to correctly interpret the data in the form.
The attribute value contains the Character Set Name List in quotation marks. If the acceptable character set does not match the character used by the user, the browser can ignore the form or treat the form differently.
The default value of this attribute is "unknown", indicating that the character set of the form is the same as that of the document containing the form.
Instance
<Form action = "form_action.php" enctype = "multipart/form-Data" Accept-charset = "UTF-8" method = "Post"> <p> First name: <input type = "text" name = "fname"/> </P> <p> Last Name: <input type = "text" name = "lname"/> </P> <input type = "Submit" value = "Submit"/> </form>
Similarly, form submission methods between different pages can also be implemented.
How to submit forms between pages with different codes