Hello,
I have a problem with different encoding behavior of special characters (e.g. äöüÄÖÜß) and empty lines when using different versions of RichTextEdit.
The goal is to convert the content of a RichTextEdit to HTML such that it can be send as a formatted email.
To do that, I use the SaveDocument function of RTE. According to the documentation only the default EncodingANSI! is supported for FileTypeHTML!. I then read the saved HTML file back in.
With the “Built-in Rich Edit Control” this works just fine.
However, the documentation “highly recommends” using the “Built-in TX Text Control” component which is enabled by default. We would like to use this component.
Using this, the encoding of special characters and empty lines is not maintained. The following example illustrates what is happening:
Input to RTE:
“Test
Test äöüÄÖÜß”
With “Built-in Rich Edit Control”:
“Test
Test äöüÄÖÜß”
With “Built-in TX Text Control”:
“Test
Â
Test äöüÄÖÜß”
Miguel Leeuwe proposed a workaround for RTE-to-HTML-conversion using Word in this post: https://community.appeon.com/index.php/qna/q-a/what-we-really-need-is-a-html-editor
Unfortunately, this is not an option, as Word is not installed on every computer that uses this functionality.
Am I missing something obvious here?
One issue could be that the temporary HTML file that is generated is specified as UTF-8 and not ANSI:
<?xml version="1.0" encoding="UTF-8" ?>
[…]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
[…]
Thank you for your help.
Cheers,
Paul
This is the support ticket I opened:
https://www.appeon.com/standardsupport/track/view?id=4226