summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-01-14 09:21:23 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-01-24 12:52:04 +0000
commit0177ff171a0338a00f27851535328c28b96532d7 (patch)
tree96a7a809728ab75e4fdc0048e8f0888b4158c4c0
parent9382017b425838d6f1265c2a197b3bcaa46d6944 (diff)
docs: hack a charset=utf-8 into pwg/adm html versions
So the encoding of the original document is respected and displays properly in browsers where the encoding autodetection fails to recognise that it's utf-8. https://bugzilla.gnome.org/show_bug.cgi?id=639448
-rw-r--r--docs/manuals.mak4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/manuals.mak b/docs/manuals.mak
index 9736c386e1..ebf65e4efe 100644
--- a/docs/manuals.mak
+++ b/docs/manuals.mak
@@ -89,6 +89,7 @@ $(BUILDDIR)/$(MAIN): $(XML) $(CSS) $(EXTRA_SRC)
# we should switch to xsltproc
# docbook2html aka jade can't add the encoding easily to the html meta
+# (but we are lazy and just abuse sed to add it)
# jw -f docbook -b html -d pwg.dsl -o ../html -V '%use-id-as-filename%' $(MAIN)
# this is a starting point
# xsltproc --nonet /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl pwg.xml
@@ -98,7 +99,8 @@ html/index.html: $(BUILDDIR)/$(MAIN) $(PNG_BUILT) $(FIG_SRC)
@echo "*** Generating HTML output ***"
@-mkdir -p html
@cp -f $(srcdir)/../image-png $(BUILDDIR)/image.entities
- @cd $(BUILDDIR) && docbook2html -o ../html -V '%use-id-as-filename%' $(MAIN)
+ @cd $(BUILDDIR) && SP_ENCODING="UTF-8" docbook2html -o ../html -V '%use-id-as-filename%' $(MAIN)
+ @$(SED) -i -e 's/\(^CONTENT.*\)\(.>\)/\1;charset=UTF-8\2/' html/*html
@test "x$(CSS)" != "x" && \
echo "Copying .css files: $(CSS)" && \
cp $(srcdir)/$(CSS) html