11.1.3 FromStringUsingUTF8 Method

Creates a binary data representation of the specified string, by encoding the string (into bytes) using UTF-8 encoding.

You would generally use this method when you need to create a binary representation of a string, as UTF-8 is capable of encoding all characters in Unicode, and it's backward compatible with ASCII.

For more information about UTF-8 encoding, see this Wikipedia article.

Input Arguments

Name

Type

Mandatory

Description

String

String (Unicode)

Yes

The string to be encoded into bytes using UTF-8 encoding.

 

Output Arguments

Name

Type

Mandatory

Description

ErrorInfo

XPRIM_ErrorInfo

No

Indicates an error that might have occurred.

 

Return Value

None

Examples

Define_Com Class(#XPRIM_Binary) Name(#PasswordBytes)

. . .

#PasswordBytes.FromStringUsingUTF8 String(#PasswordString)