Description
Split the charset/language/value fields of a supplied extended MIME parameter without percent decoding.
Media-type and MIME parameter text can include quoted strings, structured suffixes, charsets, language tags, and percent-encoded values. Splitting the syntax is separate from decoding its encoding or verifying a registered type. A local token parser may implement a deliberately limited character grammar.
Split the charset/language/value fields of a supplied extended MIME parameter without percent decoding.
When to use this tool
Use Mime Parameter Language Separator when you need the stated media/MIME parameter split, quote decoding, or suffix extraction.
How to use the tool and how it works
- Enter extendedValue. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read charset, language, encodedValue. Use the output convention below.
Split extendedValue at its first two apostrophes into charset, language, and the remaining encodedValue, preserving all strings literally.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| extendedValue | Extended Value | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| charset | Charset | Required. Text; maximum UTF-16 length 8192. |
| language | Language | Required. Text; maximum UTF-16 length 8192. |
| encodedValue | Literal remainder after the first two apostrophes; not percent-decoded. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"extendedValue": "UTF-8'en'hello%20world"
},
"output": {
"charset": "UTF-8",
"language": "en",
"encodedValue": "hello%20world"
}
} Limitations and assumptions
- Empty charset or language is allowed and later apostrophes remain in encodedValue. No charset validation, language-tag validation, percent decoding, or full RFC parameter validation is performed.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a complete header parser and explicit charset/percent decoding for an entire media parameter. Consult the relevant registration and grammar when semantic validity matters.
References
Similar or alternative tools
- Parsing: Mime Quoted Parameter Unescape
Unescape one restricted ASCII MIME quoted-string parameter, honoring quoted-pair escapes and rejecting raw quotes, controls and line folding.
- Gettext Context Message Separator Token
Find a U+0004 separator and require it to occur at most once.