'Report the encoding declared by the meta element'

def detectEncodingMeta(self):

    buffer = self.rawStream.read(self.numBytesMeta)
    assert isinstance(buffer, bytes)
    parser = EncodingParser(buffer)
    self.rawStream.seek(0)
    encoding = parser.getEncoding()
    if ((encoding is not None) and (encoding.name in (u'utf-16be', u'utf-16le'))):
        encoding = lookupEncoding(u'utf-8')
    return encoding
