ACODE$ function  

Purpose

Translate a Unicode string into an ANSI string.

Syntax

a$ = ACODE$(UnicodeStrExpression [,CodePage&])

Remarks

ACODE$ returns the ANSI, multi-byte equivalent string of Unicode contained in UnicodeStrExpression.  To convert an ANSI string into Unicode, use the UCODE$ 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 to represent a character.  Therefore, ACODE$ returns a string that has half of the byte count of the Unicode string, yet represents the same number of characters.

See also

UCODE$, UCODEPAGE