Hi,
I am trying to load some html that conatains Unicode characters using the LoadHtml procedure on the TRVHtmlImporter component which seems, when the compilation is unicode enabled, to cast the input parameter to AnsiString which therefore translates the unicode characters to question marks. Any ideas on how I can display unicode characters using the HtmlImporter?
Thanks,
Daniel
TRVHtmlImporter with Unicode Characters
-
- Posts: 2
- Joined: Tue Aug 25, 2020 1:13 pm
TRVHtmlImporter with Unicode Characters
- Attachments
-
- RichViewTestForm.zip
- (1.53 KiB) Downloaded 873 times
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: TRVHtmlImporter with Unicode Characters
The parameter of LoadHTML is AnsiString. When you pass Unicode string there, it is converted to ANSI, and Unicode characters are converted to ?.
Use this code:
Use this code:
Code: Select all
RvHtmlImporter1.LoadHtml(UTF8Encode(data));
-
- Posts: 2
- Joined: Tue Aug 25, 2020 1:13 pm
Re: TRVHtmlImporter with Unicode Characters
Thanks Sergey, that worked!