Skip to content

Main content

Mail Quoted Pair Single Escape

Decode exactly one RFC 5322 quoted-pair ASCII escape without parsing an address or permitting folded lines.

Loading tool…

Description

Decode one restricted mail quoted-pair escape.

Text parsers operate on an explicit source grammar and boundary policy. Recognizing delimiters or removing one prefix is distinct from validating the surrounding document or protocol. Preserve whether an output represents raw source spelling or decoded text, especially where quoted empty values, ASCII escapes, case and whitespace affect interpretation.

Decode one restricted mail quoted-pair escape.

When to use this tool

Use Mail Quoted Pair Single Escape when you already have escapedText and need to decode one restricted mail quoted-pair escape.

How to use the tool and how it works

  1. Enter escapedText. 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 decodedCharacter. Use the output convention below.

Require exactly two UTF-16 code units: backslash then HTAB, ASCII space or printable ASCII 33..126. Return the second character unchanged.1

The modern quoted-pair form escapes printable ASCII or whitespace with a backslash. This helper handles that restricted form, not obsolete productions or message context.2

Input fieldMeaning and unitsAccepted input
escapedTextExactly two UTF-16 code units: backslash plus HTAB, ASCII space or printable ASCII.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
decodedCharacterDecoded CharacterRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "escapedText": "\\\""
  },
  "output": {
    "decodedCharacter": "\""
  }
}

Limitations and assumptions

  • This covers one restricted quoted pair, not a full mail parser, context validation, Unicode escape or address validator.
  • 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 parser for the complete intended grammar and dialect when document validity matters. Keep source spelling, decoded values, quote/escape context and whitespace rules explicit; these helpers intentionally operate on one delimiter, prefix, field or protocol component.

References

  1. Calculation and input contract: parse/mail-quoted-pair-single-escape — tool.io

  2. RFC 5322: Quoted characters — IETF

Similar or alternative tools