UCODE$ function  

Purpose

Translate an ANSI string into a Unicode string.

Syntax

a$ = UCODE$(AnsiStrExpression [,CodePage&])

Remarks

UCODE$ returns the Unicode equivalent of the ANSI, multi-byte string contained in AnsiStrExpression.  To convert a Unicode string to an ANSI string, use the ACODE$ function.

If the optional parameter CodePage& is present, it represents the code page to be used for the conversion process.  If not given, the default code page for the locale of the executing computer is used.

Unicode strings require two bytes to represent a Unicode character, whereas ANSI strings (the native PowerBASIC string format) use one byte (or sometimes more) to represent a character.  Therefore, ACODE$ returns a string that has a lower byte count than the Unicode string, yet represents the same number of characters.

See also

ACODE$, UCODEPAGE