ACODE$ function

Purpose

Translate a Unicode string into an ANSI string.

Syntax

a$ = ACODE$(UnicodeStrExpression)

Remarks

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

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$