Blob

Description

Converts a string to a blob datatype.

Syntax

Blob ( text {, encoding} )

Argument

Description

text

The string you want to convert to a blob datatype

encoding

Character encoding of the resulting blob. Values are:

  • EncodingANSI!

  • EncodingUTF8!

  • EncodingUTF16LE! (default)

  • EncodingUTF16BE!

Returns

Blob. Returns the converted string in a blob with the requested encoding, if specified. If text is null, Blob returns null.

Usage

If the encoding argument is not provided, Blob converts a Unicode string to a Unicode blob. You must provide the encoding argument if the blob has a different encoding.

Examples

Example 1

This example saves a text string as a Unicode blob:

Blob B

B = Blob("Any Text")

Example 2

This example saves a text string as a blob with UTF-8 encoding:

Blob Blb

Blb = Blob("Any Text", EncodingUTF8!)

See also