Contents

characterEncoding

Sets the character encoding of the receiver to encoding,

Declaration

var characterEncoding: String? { get set }

Parameters

  • encoding:

    A string that specifies an encoding; it must match the name of an IANA character set. See Character Sets for a list of valid encoding specifiers.

Discussion

Typically the encoding is specified in the XML declaration of a document that is processed, but it can be set at any time. If the specified encoding does not match the actual encoding, parsing of the document might fail.

See Also

Managing Document Attributes