This class is responsible for decoding parameters that has been encoded with:
- Continuation
This is where a single parameter has such a Int64 value that it could be wrapped while in transit. Instead multiple parameters is used on each line.
Example
From: Content-Type: text/html; boundary="someVeryLongStringHereWhichCouldBeWrappedInTransit"
To: Content-Type: text/html; boundary*0="someVeryLongStringHere" boundary*1="WhichCouldBeWrappedInTransit"
- Encoding
Sometimes other characters then ASCII characters are needed in parameters.
The parameter is then given a different name to specify that it is encoded.
Example
From: Content-Disposition attachment; filename="specialCharsÆØÅ"
To: Content-Disposition attachment; filename*="ISO-8859-1'en-us'specialCharsC6D8C0"
This encoding is almost the same as EncodedWord encoding, and is used to decode the value.
- Continuation and Encoding
Both Continuation and Encoding can be used on the same time.
Example
From: Content-Disposition attachment; filename="specialCharsÆØÅWhichIsSoLong"
To: Content-Disposition attachment; filename*0*="ISO-8859-1'en-us'specialCharsC6D8C0"; filename*1*="WhichIsSoLong"
This could also be encoded as:
To: Content-Disposition attachment; filename*0*="ISO-8859-1'en-us'specialCharsC6D8C0"; filename*1="WhichIsSoLong"
Notice that filename*1
does not have an *
after it - denoting it IS NOT encoded.
There are some rules about this:
- The encoding must be mentioned in the first part (filename*0*), which has to be encoded.
- No other part must specify an encoding, but if encoded it uses the encoding mentioned in the first part.
- Parts may be encoded or not in any order.
More information and the specification is available in RFC 2231.