4.5. "text/plain"フォームデータのCharsetパラメータ
4.5. The Charset Parameter for "text/plain" Form Data
🇬🇧 英文原文
In the case where the form data is text, the charset parameter for the "text/plain" Content-Type MAY be used to indicate the character encoding used in that part. For example, a form with a text field in which a user typed "Joe owes €100", where € is the Euro symbol, might have form data returned as:
--AaB03x
content-disposition: form-data; name="field1"
content-type: text/plain;charset=UTF-8
Joe owes €100.
--AaB03x
In practice, many widely deployed implementations do not supply a charset parameter in each part, but rather, they rely on the notion of a "default charset" for a multipart/form-data instance. Subsequent sections will explain how the default charset is established.
🇯🇵 日本語訳
フォームデータがテキストである場合、「text/plain」Content-Typeのcharsetパラメータを使用して、そのパートで使用される文字エンコーディングを示してもよい(MAY)。たとえば、ユーザーが「Joe owes €100」と入力したテキストフィールドを持つフォーム(€はユーロ記号)は、次のようにフォームデータを返す可能性がある:
--AaB03x
content-disposition: form-data; name="field1"
content-type: text/plain;charset=UTF-8
Joe owes €100.
--AaB03x
実際には、広く展開されている多くの実装は、各パートにcharsetパラメータを提供せず、multipart/form-dataインスタンスの「デフォルト文字セット」という概念に依存している。後続のセクションでは、デフォルト文字セットがどのように確立されるかを説明する。