installMenu loads a menu definition from a text cast member. In our
implementation, at load time we coerce the contents to Unicode based on
the platform encoding. Unfortunately for us, Macromedia decided to use
two non-ASCII codepoints for indicating checkmarks and code separators,
which are evaluated as the byte value instead of whatever physical
character they correspond to.
Amending this is slightly hacky, as the UTF-8 equivalent of these
codepoints is two bytes long. The text is first normalised to remove the
platform transformation. The checkmark UTF-8 sequence is replaced with
the single byte equivalent, to maintain compatibility with MacMenu.
Finally, the code separator UTF-8 sequence is used to split the line
between menu definition and script definition.
Fixes the menu system in Eastern Mind.
The previous way I handled the FXmp mappings overcomplicated MacText.
It also resulted in behavior different from the original Director. With
the previous implementation, if a Win movie with Arial text was opened
with the platform set to Mac, the textFont of field 1 would return
Arial, while it would return the mapped font name Helvetica in the
original. This implementation's behavior should match the original.