Unicode characters in exported HTML

General TRichView support forum. Please post your questions here
Post Reply
mstaszew
Posts: 7
Joined: Wed Feb 13, 2013 4:52 pm

Unicode characters in exported HTML

Post by mstaszew »

Hi there,

I'm exporting my text as HTML and Unicode characters are exported using decimal HTML character entity such as...

稿稸稕稜窔稸

I'd like to keep have the characters exported in UTF-16 little endian to match Delphi's string format. I'm sending the HTML to a server and cannot have it in the decimal representation it's currently in.

Is this possible?

Thanks,
Michael
Sergey Tkachenko
Site Admin
Posts: 17571
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

UTF-16 - no.
But UTF-8 - yes. Include rvsoUTF8 in the Options parameter of SaveHTML/SaveHTMLEx.
(if you need UTF-16, you can save as UTF8, then convert it to UTF-16 using Utf8Decode function, then replace the first occurence of 'UTF-8' to 'UTF-16' (two times, if you saved XHTML)).
mstaszew
Posts: 7
Joined: Wed Feb 13, 2013 4:52 pm

Post by mstaszew »

Perfect, works as expected. Thanks.
Post Reply