Encoding (NotesMIMEEntity - JavaScript)

Read-only. Current® encoding for the non-header content of a MIME entity.

Defined in

NotesMIMEEntity

Syntax

getEncoding() : int

Legal value

  • MIMEEntity.ENC_BASE64 (1727) -- Content-Transfer-Encoding is "base64"
  • MIMEEntity.ENC_EXTENSION (1731) -- Content-Transfer-Encoding is user-defined
  • MIMEEntity.ENC_IDENTITY_7BIT (1728) -- Content-Transfer-Encoding is "7bit"
  • MIMEEntity.ENC_IDENTITY_8BIT (1729) -- Content-Transfer-Encoding is "8bit"
  • MIMEEntity.ENC_IDENTITY_BINARY (1730) -- Content-Transfer-Encoding is "binary"
  • MIMEEntity.ENC_NONE (1725) -- no Content-Transfer-Encoding header
  • MIMEEntity.ENC_QUOTED_PRINTABLE (1726) -- Content-Transfer-Encoding is "quoted-printable"

Usage

The Content-Transfer-Encoding header specifies an entity's encoding as defined in RFC-2045.

Use decodeContent and encodeContent to change an entity's encoding.

Examples

This button gets the MIME content from the current document.
var doc:NotesDocument = currentDocument.getDocument();
var mime:NotesMIMEEntity = doc.getMIMEEntity();
if (mime != null) {
	var m:string = "Content type: " + mime.getContentType() + "\n" +
	"Content subtype: " + mime.getContentSubType() + "\n" +
	"Character set: " + mime.getCharset() + "\n" +
	"Encoding: " + mime.getEncoding();
	requestScope.status = doc.getItemValueString("Subject") + "\n" + m + "\n" +
	mime.getHeaders() + "\n" + mime.getContentAsText();
} else {
	requestScope.status = "Not MIME - " + doc.getItemValueString("Subject");
}