I'm using the TX Text Control ActiveX 28.0 in PowerBuilder 2019 R3 to edit rich text and convert it to HTML for sending in an email.
It seems the only way to convert the data to HTML is to call SaveDocument with a file type of FileTypeHTML! and then read that file in again into a string so I can use it as needed.
There are two issues with this:
1. It's not all that efficent. I'm surprised there isn't a way to just extract the HTML version directly into a string. Am I missing something?
2. SaveDocument with a file type of FileTypeHTML! appears to only save in ANSI encoding . Is this not an issue? I note that when I paste in some text from a Word document I get non-breaking-spaces sometimes, and when I call SaveDocument and then reload it from file into a string these are converted to an Â character. I suspect this has something to do with the encoding, but I'm not really sure. The only way I can think of to handle this, is to replace them all with   after reading from file into a string.
So if anyone has any thoughts on this, perhaps I am doing something wrong, perhaps I don't understand how rich text, HTML and Unicode work, perhaps this is a bug that needs to be reported?