C# Class RemObjects.InternetPack.Messages.Mime.Decode.EncodedWord

Utility class for dealing with encoded word strings

EncodedWord encoded strings are only in ASCII, but can embed information about characters in other character sets.

It is done by specifying the character set, an encoding that maps from ASCII to the correct bytes and the actual encoded String.

It is specified in a format that is best summarized by a BNF:
"=?" character_set "?" encoding "?" encoded-text "?="
Exibir arquivo Open project: remobjects/internetpack Class Usage Examples

Public Methods

Method Description
Decode ( String encodedWords ) : String

Decode text that is encoded with the EncodedWord encoding.

This method will decode any encoded-word found in the String.
All parts which is not encoded will not be touched.

From RFC 2047:
Generally, an "encoded-word" is a sequence of printable ASCII characters that begins with "=?", ends with "?=", and has two "?"s in between. It specifies a character set and an encoding method, and also includes the original text encoded as graphic ASCII characters, according to the rules for that encoding method. Example:
=?ISO-8859-1?q?this=20is=20some=20text?= other text here

See RFC 2047 section 2 "Syntax of encoded-words" for more details

Method Details

Decode() public static method

Decode text that is encoded with the EncodedWord encoding.

This method will decode any encoded-word found in the String.
All parts which is not encoded will not be touched.

From RFC 2047:
Generally, an "encoded-word" is a sequence of printable ASCII characters that begins with "=?", ends with "?=", and has two "?"s in between. It specifies a character set and an encoding method, and also includes the original text encoded as graphic ASCII characters, according to the rules for that encoding method. Example:
=?ISO-8859-1?q?this=20is=20some=20text?= other text here
See RFC 2047 section 2 "Syntax of encoded-words" for more details
If is
public static Decode ( String encodedWords ) : String
encodedWords String Source text. May be content which is not encoded.
return String