IHTMLDocument2::charset Property

Gets or sets the character set used to encode the object.


HRESULT IHTMLDocument2::get_charset(BSTR *p);
HRESULT IHTMLDocument2::put_charset(BSTR v);


  • p
    Pointer to a variable of type BSTR that receives the character set.
  • v
    BSTR that specifies the character set.

Return Value

Returns S_OK if successful, or an error value otherwise.


In Microsoft Internet Explorer 6, This property now applies to the a, link, and script objects.