Function Character Types Class

ComposeCharacter

Take a two-character string like "a." or ".a" and return the corresponding accented character like A-umlaut, etc. Compose an accented alphabetic or other extended character from a two-character sequence usually consisting of one alphabetic and one punctuation character.

Signature (Visual Basic / VBA)

Public Function ComposeCharacter( _
    ByVal vTwoASCIIChars As Variant _
    ) As Variant

Code Example

    ComposeCharacter("CO") = Chr$(169)

Parameters

Parameter Description
vTwoASCIIChars String containing two alphabetic characters which will be translated into the corresponding extended character. Function returns Null if vTwoASCIIChars is Null or cannot be fixed up to a String. Function returns vTwoASCIIChars unchanged if it is less than two characters long. Function returns an empty string if the first two characters in vTwoASCIIChars do not translate into an "extended" character.

Notes & Version History

Note Function only works for characters in the ANSI Windows character set because those definitions are hard-coded. Chr$(169) is the "c-in-a-circle" copyright symbol in the ANSI Windows character set.
Note Use the ComposeCharacterSample Sub to display a list of the compose sequences that are supported by this function.