I'm using MATLAB to programmatically create a Microsoft Word document on Windows. In general this solution works fine, but it is having trouble with non-ASCII text. For example, take this code:
umbrella = char(9730);
toSend = ['Have you seen my ' umbrella '?'];
wordApplication = actxserver('Word.Application');
wordApplication.Visible = 1;
selection = wordApplication.Selection;
The Command Window displays the umbrella character correctly, but the character in the Word document is the "question mark in a box" missing character symbol. I can cut-and-paste the character from the Command Window into Word, so that character is indeed available in that font.
The TypeText method must be assuming ASCII. There are resources on how to set Unicode flags for similar operations from other languages, but I don't know how to translate them into the syntax I have available in MATLAB.