xmlReaderGetEncoding

 

SYNOPSIS

    string xmlReaderGetEncoding(xmlReader reader)

Parameters:

  • reader - the xmlReader object

Returns:

  • The encoding of the document.


DESCRIPTION
xmlReaderGetEncoding() returns the character encoding used in the document, as set by the XML declaration, such as:

<?xml version="1.0" encoding="ISO-8859-1"?>

If no encoding is given in a declaration (or no declaration is present), then xmlReaderGetEncoding() will return nothing (although UTF-8 is assumed as the encoding, as defined in the XML spec).


EXAMPLE

    <$encoding = (xmlReaderGetEncoding($reader))>


SEE ALSO
xmlReaderGetLang, xmlReaderGetVersion


Copyright © Thunderstone Software     Last updated: Dec 10 2018
Copyright © 2019 Thunderstone Software LLC. All rights reserved.