After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639448 - pwg: Wrong encoding - mangled utf-8 characters
pwg: Wrong encoding - mangled utf-8 characters
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: documentation
0.10.31
Other Linux
: Normal minor
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-13 18:08 UTC by Tony Houghton
Modified: 2011-01-14 09:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tony Houghton 2011-01-13 18:08:34 UTC
The Plugin Writers' Guide contains UTF-8 characters (in Tim-Philipp Müller's name, I don't know if there are other cases) but the documents all assume an encoding of ISO-8859-1 so the character is displayed incorrectly. 0.10.31.2 and 0.10.30 (current in Debian) at least are both affected, and it affects all 3 formats: HTML, PDF and PS.
Comment 1 Tim-Philipp Müller 2011-01-14 00:25:43 UTC
Thanks, should be fixed now:

 commit 4583b4f0f22bd707515befd44e013216e73c3883
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Fri Jan 14 00:20:43 2011 +0000

    docs: fix garbled UTF-8 characters when generating app dev manual ps/pdf
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639448

(html seems ok to me by default, not sure why)
Comment 2 Tony Houghton 2011-01-14 01:00:15 UTC
The offline copy is OK for me too, because it doesn't specify an encoding and the system default is UTF-8. But I think gstreamer.freedesktop.org is configured to default to ISO-8859-1.
Comment 3 Tim-Philipp Müller 2011-01-14 09:24:34 UTC
Ah, I see what you mean now (it always shows fine in epiphany/webkit, but not in iceweasel/firefox for e).

I came up with this hack, which I'll push after the relase.

diff --git a/docs/manuals.mak b/docs/manuals.mak
index 9736c38..ebf65e4 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