Description
Plan MIME parameter value token versus quoted-string spelling, including empty strings and escaped quotes; not a charset/extended-parameter encoder.
A media type has a type/subtype token and may carry named parameters. Multipart content uses explicit boundary delimiter lines around its parts. Token case rules, parameter quoting, repeated records and exact line endings affect how a representation is interpreted; a lexical check is narrower than parsing a complete message.1
Plan MIME parameter value token versus quoted-string spelling, including empty strings and escaped quotes; not a charset/extended-parameter encoder.
When to use this tool
Use this tool to plan MIME parameter value token versus quoted-string spelling, including empty strings and escaped quotes; not a charset/extended-parameter encoder.
How to use the tool and how it works
- Enter values using the field definitions below.
- Run the operation. Correct input errors before interpreting an output.
- Read result.values. Use the ordering, boundary rules and absence conditions described below.
Validate each parameter value, preserve token-safe values unquoted, and otherwise quote with backslash escaping. Return whether quoting was required and the serialized spelling.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| values | Parameter-value strings to inspect or serialize. | Dense list of at most 128 strings, each at most 8,192 UTF-16 code units. |
| Output field | Interpretation |
|---|---|
| result | Object containing the named fields below. |
| result.values | Original parameter values with quoted flags and serialized spellings. |
{
"input": {
"values": [
"a",
"x y",
""
]
},
"output": {
"result": {
"values": [
{
"value": "a",
"quoted": false,
"serialized": "a"
},
{
"value": "x y",
"quoted": true,
"serialized": "\"x y\""
},
{
"value": "",
"quoted": true,
"serialized": "\"\""
}
]
}
}
} Limitations and assumptions
- This uses the declared token/quoted-string subset, not extended charset or language parameter encoding.
- Supported boundary strings contain 1–70 characters from the declared MIME boundary subset and cannot end in a space. Single-byte envelope budgets are distinct from UTF-8 text byte counts and from a complete MIME transport.
- Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.
Alternative or Complementary methods
Choose the target media-type and multipart conventions explicitly. Use a complete MIME parser for nested messages and encodings; these record and delimiter tools handle only their stated representations.
References
-
RFC 2046: MIME Media Types — RFC Editor
-
Tool behavior and example: MIME Parameter Quotedness Plan — tool.io
Similar or alternative tools
- MIME Parameter Byte Order Profile
Profile byte-order source spans in canonical Latin-1 MIME parameter serialization, retaining occurrence order; not machine endianness or Unicode encoding detection.
- Media Type Parameter Conflict Table
Audit conflicting decoded MIME parameter values under case-insensitive names and case-sensitive literal values; no registered-parameter equivalence inference.