public final String getRequestedEncoding(Query query) {
        String encoding = query.getModel().getEncoding();
        if (encoding != null) return encoding;
        return getEncoding();
    }
Returns the encoding of the query, or the encoding given by the template if none is set
container-search/src/main/java/com/yahoo/search/pagetemplates/result/PageTemplatesXmlRenderer.java