Manipulating Magic xpi BLOB/Alpha Encoding (Magic xpi 4.5)
Magic xpi gives you the ability to select the variable’s target BLOB type in the Flow Data Configuration window and in the Data Mapper Destination.
In the Flow Data Configuration window, the Encoding column's drop-down list will give the following options when a BLOB variable is updated: ANSI, Unicode, and Binary. When an Alpha variable is updated, the drop-down list will give the following options: ANSI and Unicode. Magic xpi will then automatically convert the Update expression to the selected encoding.
If you update a BLOB with any content, and define its encoding as Binary in the Flow Data Configuration window, the content will be passed “as is” to the binary BLOB with no conversion.
In the above example, after the first line evaluation, the F.Var1 variable will be converted to an ANSI BLOB holding the 'OK' text encoded in ANSI. After the second line evaluation, the F.Var1 variable will be converted to a Unicode BLOB holding the 'OK' text encoded in Unicode.
You can control the target encoding of the variable in the node properties for Variable Destinations and Call Flow Destinations. The usage is identical to that defined in the Flow Data Configuration window (above).
In the generated Data Mapper code, Alpha variables are defined by default as Unicode and BLOB as binary. This means that if you use a variable as a Source, any Alpha variable that you select will first be converted to Unicode, and every BLOB variable that you select will first be converted to a binary BLOB. If you want to avoid this conversion, you should use the variables directly in the expression instead of defining them as a separate Source.