This algorithm specifies the generation of the array of expanded characters, if the specified character can be expanded.

 COMMENT GetExpandedCharacters
 COMMENT  On Entry:  SourceCharacter - Character to look for in
 COMMENT                               expansion table
 COMMENT  On Exit:   Result          - Array of two unicode characters
 COMMENT                               for the expansion or null if no
 COMMENT                               expansion found
 COMMENT NOTE: Look for default table characters first, some entries
 COMMENT       in the expansion table are only used in exception tables
 COMMENT       for some locales (ie: 0x00c4 Ä)
     GetExpandedCharacters(IN SourceCharacter : Unicode Character,
                           OUT Result : Unicode Character[2])
 // Search for the expansion in the expansion table
 OPEN SECTION ExpansionTable where name is
    SORTTABLES\EXPANSION from unisort.txt
 SELECT RECORD ExpansionRow FROM ExceptionTable WHERE field 1
    matches SourceCharacter
 IF ExpansionRow is null THEN
     SET Result to null
     RETURN Result
 SET Result[0] to ExpansionRow.Field2
 SET Result[1] to ExpansionRow.Field3
 RETURN Result