Skip to main content
Skip table of contents

transcodeToBlob() Operation

Syntax
NONE
set aBlob = aString.transcodeToBlob(charset)
set aBlob = transcodeToBlob(LITERAL, charset)
SemanticsThe operation transcodes internal strings (always UTF-8 encoded) into a blob containing the characters of the current string encoded in a given character set.
SubstitutablesaString Can be any variable or object attribute having the type String.  
charset Can be any variable or object attribute having the type String and denoting a valid character set (e.g. UTF-8, ISO-8859-1, etc.). A list of supported character sets can be found in Charset Definitions.
LITERAL
Examples

This example transforms a string into a blob that contains ISO-8859-1 encoded characters.

NONE
set aBlob = aString.transcodeToBlob("ISO-8859-1"); 

Example File (Builder project Basic Modeling/Data):

<your example path>\Basic Modeling\Data\uml\transcoding.xml

Figure: Operation transcodeToBlob()

It is only possible to transcode objects of type String to a Blob object. If you would like to transcode another base type like Integer or DateTime into a Blob object you have first to convert this object into a String (see transcodeToString() Operation) and then use the transcodeToBlob() operation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.