TRVHTMLSaveProperties.EncodingStr

<< Click to display table of contents >>

TRVHTMLSaveProperties.EncodingStr

Encoding string for writing in HTML files.

property EncodingStr: TRVUnicodeString;

(introduced in version 21)

If EncodingStr is not empty, its value is written in saved HTML files to define encoding.

If EncodingStr empty, encoding value for writing in HTML is calculated automatically, basing on Encoding property.

Unlike Encoding, EncodingStr does not affect how HTML is saved, it only modifies HTML header.

This property may be useful if you want to convert HTML to another encoding after saving.

Note: for WideMemo fields, TDBRichViewEdit component stores HTML in UTF-16 encoding, ignoring EncodingStr and Encoding.

Example: how to save HTML in UTF-16 encoding

1. Assign Encoding = rvhtmleUTF8, EncodingStr = 'utf-16'.

2. Save HTML.

3. Convert the result from UTF-8 to UTF-16.

Now you have HTML in UTF-16 encoding, with 'utf-16' written in its header.

 

Default value:

'' (empty string)