ansiToUnicode

ansiToUnicode(): String;

The ansiToUnicode method of the Binary primitive type interprets the binary as ANSI characters and returns a copy converted to a Unicode string. This method can be invoked only from a Unicode application.

If this method is invoked from an ANSI application, the following exception is raised.

1000    Invalid parameter type

Conversion of the binary stops at the first null character. If the binary contains embedded nulls, the string returned from the conversion therefore represents only that part of the binary up to the first null character.