[Gambas-user] Question about TextEdit
rwe-sse at osnanet.de
Mon Jul 5 12:23:17 CEST 2021
Am 03.07.21 um 17:11 schrieb Benoît Minisini:
> Le 03/07/2021 à 14:09, bb a écrit :
>> Aha, now I see what you have done. Nice trick. I'll have to remember
>> that one for scraping rich text.
> You can use String.FromHTML() from 'gb.util' too. But beware that just a
> few HTML entities are handled. Hopefully, they are less and less
> frequent now that HTML is mostly UTF-8.
I tried it, and it works flawlessly. Then I saw that sometimes I
included E-Mail-Texts, and these look quite nice if displayed as
RichText. So this would be another pro for RichText.
There are two minor issues: String.FromHTML() leaves a trailing LF and
double LFs within the text. So I included a String.Mid(..., 2) and
Replace(..., "\n\n", "\n"). That leaves perfect plain UTF-8 texts in a
More information about the User