0

According to e.g. What does enctype='multipart/form-data' mean? there are 3 possible arguments for the enctype attribute in an HTML form:

  • "application/x-www-form-urlencoded" (the default)
  • "multipart/form-data"
  • "text/plain"

But I have also seen enctype="utf8" in some forms. Is it common to use this too, and how does it relate to the 3 possibilities above?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
nosta
  • 21
  • 3
  • 1
    It's not a valid option, so the invalid value default (`"application/x-www-form-urlencoded"`) is used instead. – jonrsharpe Apr 14 '23 at 14:57
  • You mean `enctype="multipart/form-data;charset=UTF-8"` – mplungjan Apr 14 '23 at 14:57
  • The first comment on the linked story is a link to the part of the spec https://www.w3.org/html/wg/spec/association-of-controls-and-forms.html#attr-fs-enctype about valid values for `enctype`. Not sure what else is needed. – Heretic Monkey Apr 14 '23 at 15:07
  • I have seen it exactly like `enctype="utf8"`. If this is not valid, then it's ok. – nosta Apr 15 '23 at 17:50

0 Answers0