Ahhh, you are correct. I didn't think it through that far. I just took a small RTF string and used ChrW to put some Unicode characters in it, and it didn't work. And, I now realize, per RTF specifications, it shouldn't have worked.
To see this, I just fired up WordPad and put some Unicode characters into a document and then saved it. All I typed in was 111[alt-1234]222 and then saved it:
Here's the resulting RTF string:
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset204 Calibri;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22 111\f1\lang1049\u1234?\f0\lang1033 222\par
}
I bolded and made red the Unicode character. I now see that we must use the \u escape to get unicode characters into our RTF string.
So, it's all good.
Thanks,
Elroy





Reply With Quote