Skip to content

Main content

Mime Parameter Language Separator Tool

Split the charset/language/value fields of a supplied extended MIME parameter without percent decoding.

Loading tool…

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

  1. Enter extendedValue. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
extendedValueExtended ValueRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
charsetCharsetRequired. Text; maximum UTF-16 length 8192.
languageLanguageRequired. Text; maximum UTF-16 length 8192.
encodedValueLiteral remainder after the first two apostrophes; not percent-decoded.Required. Text; maximum UTF-16 length 8192.
json
{
  "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

  1. Calculation and input contract: parse/mime-parameter-language-separator — tool.io

Similar or alternative tools