Re: XHTML and GTK-Doc



Am 05.03.2011 20:06, schrieb W. Michael Petullo:
> I am finding that GTK-Doc generates HTML code that contains non-ASCII
> UTF-8 characters (e.g., m-dash).

Gtk-doc is using the docbook xsl stylesheets to produce html from docbook xml.
There is an option to use different encodings, but that is not exposed as an option.

> These are not displayed properly when
> viewing the documents after receiving them from my HTTP server (they
> look fine if I view them from the local filesystem).
> 
> I've noticed that my webserver is configured to provide the following
> HTTP headers:
> 
> HTTP/1.1 200 OK
> Date: Sat, 05 Mar 2011 18:00:22 GMT
> Server: Apache/2.2.17 (Unix)
> Last-Modified: Sat, 05 Mar 2011 17:54:03 GMT
> ETag: "817e20-24b3-49dbff2b364c0"
> Accept-Ranges: bytes
> Content-Length: 9395
> Connection: close
> Content-Type: text/html; charset=ISO-8859-1
> 
> The "Content-Type: text/html; charset=ISO-8859-1" seems to cause the
> trouble.
> 
> Is it possible to instruct GTK-Doc to use HTML special characters (e.g.,
> —, I think) instead of UTF-8 encodings? I do not have the ability
> to reconfigure my webserver.
> 

You could hack your local /usr/share/gtk-doc/data/gtk-doc.xsl
and change the line that contains:
<xsl:param name="chunker.output.encoding" select="'UTF-8'"/>

I don'T intent do expose this as a parameter though.

Stefan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]