Added charset meta to Solr HTML writers.

Non-ASCII characters are thus correctly rendered in browsers.
This is a fix ro mantis 706 : http://mantis.tokeek.de/view.php?id=706
pull/93/head
luccioman 8 years ago
parent 08a0acc35d
commit 0ba5a838f7

@ -83,6 +83,7 @@ public class GrepHTMLResponseWriter implements QueryResponseWriter {
assert values.get("response") != null;
writer.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n");
writer.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n");
writer.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"../env/base.css\" />\n");
writer.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"../env/style.css\" />\n");
SolrParams params = request.getOriginalParams();

@ -117,6 +117,7 @@ public class HTMLResponseWriter implements QueryResponseWriter {
writer.write(" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n");
writer.write(" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\">\n");
writer.write("<head profile=\"http://www.w3.org/2003/g/data-view\">\n");
writer.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n");
this.writeJSLicence(writer);
//writer.write("<link rel=\"transformation\" href=\"http://www-sop.inria.fr/acacia/soft/RDFa2RDFXML.xsl\"/>\n");

Loading…
Cancel
Save