[fpc-pascal] Html mail displays differently than the body text does...
bo.berglund at gmail.com
Thu Jan 18 22:26:04 CET 2018
On Thu, 18 Jan 2018 18:46:28 +0100, Bo Berglund
<bo.berglund at gmail.com> wrote:
>I have already set the message to use UTF-8 via the messagebuilder:
>IB := TIdMessageBuilderHtml.Create;
>IB.HtmlCharSet := 'UTF-8';
>IB.Html.Text := slBody.Text;
>IB.PlainText.Text := slTxtBody.Text;
I ended up completely removing the line
IB.HtmlCharSet := 'UTF-8';
Then I added a "translator" function which replaces Swedish characters
in a string with the HTML escape sequences. I call this function to
wash text before inserting into the HTML mail body.
This solved the mailing problem for the case where new files and
folders are using these characters. But the existing names erroneously
converted (from cvs to svn) I have to manually rename via Subversion
to get right for the future. Hopefully there are only a handful of
such files/folders (I have so far found about a dozen).
Developer in Sweden
More information about the fpc-pascal